You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tomee.apache.org by "Dimitri (JIRA)" <ji...@apache.org> on 2013/05/26 18:16:21 UTC

[jira] [Commented] (TOMEE-947) Injection doesn't work in WebSocket inbound threads

    [ https://issues.apache.org/jira/browse/TOMEE-947?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13667350#comment-13667350 ] 

Dimitri commented on TOMEE-947:
-------------------------------

P.S. Well, I suppose that in Tomcat 8 that non-standard WebSocket implementation will be superseded by JSR-356 one, so this may seem a minor and non-significant issue. From the other hand, It will take time for Tomcat 8 to be released and for TomEE to adopt it. Right now, adding WebSocket functionality to a project that relies heavily on CDI causes a lot of pain.

Thanks in advance!
                
> 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