You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openwebbeans.apache.org by "Thomas Andraschko (JIRA)" <ji...@apache.org> on 2016/07/21 09:38:20 UTC

[jira] [Commented] (OWB-1136) Can't access SessionScoped beans inside @Observers @Initialized(SessionScoped)

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

Thomas Andraschko commented on OWB-1136:
----------------------------------------

hints from romain:

org.apache.webbeans.web.context.WebContextsService#initSessionContext try to sessionContexts.set(currentSessionContext); before the fireContextLifecyleEvent

> Can't access SessionScoped beans inside @Observers @Initialized(SessionScoped)
> ------------------------------------------------------------------------------
>
>                 Key: OWB-1136
>                 URL: https://issues.apache.org/jira/browse/OWB-1136
>             Project: OpenWebBeans
>          Issue Type: Bug
>          Components: Context and Scopes, Lifecycle, Simple Web Beans
>            Reporter: Thomas Andraschko
>            Assignee: Thomas Andraschko
>             Fix For: 1.6.4
>
>
>     @Produces
>     @SessionScoped
>     public MySession produce()
>     {
>         return new MySession();
>     }
>     
>     @Inject private MySession session;
>     
>     public void init(@Observes @Initialized(SessionScoped.class) HttpSession httpSession)
>             throws Exception
>     {
>         session.toString();
>     }



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)