Type: Feature Request
Status: Open (View Workflow)
Affects Version/s: None
Fix Version/s: None
Similar Issues:Show 10 results
CDI-380 Clarify SessionScoped CDI-410 @RequestScoped Javadoc outdated CDI-405 Reword the description of @RequestScoped and @ApplicationScoped in section 2.4.1 CDI-379 Clarify life cycle of RequestScoped CDI-279 Provide CDI SPI that could be used to directly replace java.lang.reflect methods for expanding the use of @Stereotype to Java EE 7 platform CDI-417 SessionContext active during HttpSessionActivationListener events CDI-362 No-interface view EJB proxying rules are less strict than CDI, leading to odd error reporting CDI-429 Consistency of all built-in normal scopes CDI-381 Additional implementations of Request Context CDI-275 clarify behavior of stateful beans (EJB) and cdi scopes
We've been testing injection into a WebSocket endpoint.
@ReqestScoped objects are usable within the @OnOpen callback. This is because this object is executed within a valid request scope.
However if you try to use the injected object from within the @OnMessage callback you get a Weld error:
WELD-001303 No active contexts for scope type javax.enterprise.context.RequestScoped
Can the definition of when @RequestScoped is active be expanded to include a WebSocket @OnMessage callback?