Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jetty-users] Is it possible to create session scoped objects with Websocket + CDI integration

Can you please suggest any alternatives?

On Tue, Nov 10, 2015 at 10:24 AM, Joakim Erdfelt <joakim@xxxxxxxxxxx> wrote:
When we last investigated CDI on JSR356 (javax.websocket) it was undefined.
Neither the CDI spec folks on the Weld project, nor the JSR356 spec group had any answers.
There are open/unresolved bugs at both specs about it.

I suspect that the undefined nature of the lifecycle of a WebSocket is the root cause of it.
The early discussions felt that WebSocket, being born from an HTTP Upgrade should follow the same lifecycle and rules as an HTTP request.
But this has proved problematic.  Even concepts like HttpSession duration/lifecycle/updates, and Authentication (what to do if auth is revoked during a websocket session) is undefined in JSR356.

Joakim Erdfelt / joakim@xxxxxxxxxxx

On Tue, Nov 10, 2015 at 6:16 AM, Mohan Kumar G <mohan.gundappa@xxxxxxxxx> wrote:
Hello,

Is there a way to have Session scoped object?

Service designed :   Jetty (as stand alone) + Websocket + CDI

Requirement:   Want to have an object called Storage which should get create when client establishes websocket connection and destruct when websocket connection is closed.  Essentially websocket session and Storage object should have one to one mapping.

Thanks and Regards
Mohan

_______________________________________________
jetty-users mailing list
jetty-users@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-users


_______________________________________________
jetty-users mailing list
jetty-users@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-users


Back to the top