Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[jetty-users] CDI Session scope not active in JettyWebSocketServlet?

Hi,

I've been playing with websockets quite a bit, and have Http session and CDI configured.

If I make an HttpServlet, I can inject @SessionScoped beans.  The same bean won't work with JettyWebSocketSession which creates an @WebSocket endpoint.  I am getting the error:

WELD-001303: No active contexts for scope type jakarta.enterprise.context.SessionScoped

I am wondering if this is supposed to work?  I looked at Jetty examples, and there isn't one which covers this exact scenario: Http sessions, CDI, and websocket servlet.

Thanks,

Jeremy



Back to the top