[cdi-dev] [JBoss JIRA] (CDI-370) Expand @RequestScoped and @SessionScoped to account for WebSocket

Guillermo González de Agüero (JIRA) issues at jboss.org
Mon Sep 26 12:55:01 EDT 2016


    [ https://issues.jboss.org/browse/CDI-370?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13298597#comment-13298597 ] 

Guillermo González de Agüero commented on CDI-370:
--------------------------------------------------

Just wondering, could CDI-30 be used to solve cases like this?

> Expand @RequestScoped and @SessionScoped to account for WebSocket
> -----------------------------------------------------------------
>
>                 Key: CDI-370
>                 URL: https://issues.jboss.org/browse/CDI-370
>             Project: CDI Specification Issues
>          Issue Type: Feature Request
>            Reporter: Joseph Snyder
>            Assignee: Antoine Sabot-Durand
>
> 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:
> SEVERE:   org.jboss.weld.context.ContextNotActiveException:
> 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?



--
This message was sent by Atlassian JIRA
(v6.4.11#64026)



More information about the cdi-dev mailing list