[
https://issues.apache.org/jira/browse/TOMEE-947?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Dimitri updated TOMEE-947:
--------------------------
Description:
When using Tomcat's WebSocket implementation (that means, extending
org.apache.catalina.websocket.WebSocketServlet), it is not possible to use
injection, both CDI and non-CDI, from inbound processing threads. Injecting
scoped and non-scoped objects simply gives null.
Furthermore, when trying to access a session-scoped instance (OWB proxy) that
has already been injected into some other object, the following is written to
the log:
May 26, 2013 7:57:49 PM org.apache.openejb.cdi.CdiAppContextsService
lazyStartSessionContext
WARNING: Could NOT lazily initialize session context because of null
RequestContext
was:
When using Tomcat's WebSocket implementation (that means, extending
org.apache.catalina.websocket.WebSocketServlet), it is not possible to use
injection, both CDI and non-CDI, from inbound processing threads. Injecting
scoped and non-scoped objects simply gives null.
Furthermore, when trying to access an already injected session-scoped instance
(OWB proxy in fact) from elsewhere, the following is written to the log:
May 26, 2013 7:57:49 PM org.apache.openejb.cdi.CdiAppContextsService
lazyStartSessionContext
WARNING: Could NOT lazily initialize session context because of null
RequestContext
> Injection doesn't work in WebSocket inbound threads
> ---------------------------------------------------
>
> Key: TOMEE-947
> URL: https://issues.apache.org/jira/browse/TOMEE-947
> Project: TomEE
> Issue Type: Bug
> Affects Versions: 1.6.0
> Environment: Oracle JDK 1.7.0.21, Linux i586,
> apache-tomee-1.6.0-20130525.041140-81-jaxrs
> Reporter: Dimitri
> Attachments: WebSocket-CDI-Test.war, WebSocket-CDI-Test.zip
>
>
> When using Tomcat's WebSocket implementation (that means, extending
> org.apache.catalina.websocket.WebSocketServlet), it is not possible to use
> injection, both CDI and non-CDI, from inbound processing threads. Injecting
> scoped and non-scoped objects simply gives null.
> Furthermore, when trying to access a session-scoped instance (OWB proxy) that
> has already been injected into some other object, the following is written to
> the log:
> May 26, 2013 7:57:49 PM org.apache.openejb.cdi.CdiAppContextsService
> lazyStartSessionContext
> WARNING: Could NOT lazily initialize session context because of null
> RequestContext
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira