You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openwebbeans.apache.org by "Mark Struberg (JIRA)" <ji...@apache.org> on 2011/08/27 19:56:37 UTC

[jira] [Resolved] (OWB-601) WebContextsService only works if ServletContext is given

     [ https://issues.apache.org/jira/browse/OWB-601?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mark Struberg resolved OWB-601.
-------------------------------

    Resolution: Fixed

committed. Thanks to Ronald for the patch!

> WebContextsService only works if ServletContext is given
> --------------------------------------------------------
>
>                 Key: OWB-601
>                 URL: https://issues.apache.org/jira/browse/OWB-601
>             Project: OpenWebBeans
>          Issue Type: Bug
>          Components: Java EE Integration
>    Affects Versions: 1.1.0
>            Reporter: Mark Struberg
>            Assignee: Mark Struberg
>             Fix For: 1.1.1
>
>         Attachments: also_activate_dummy_sessionContext.patch
>
>
> WebContextsService#initRequestContext can only be started if you supply a ServletRequestEvent.
> This is not possible for threads which get started asynchronous, e.g. to handle a long running action.
> In this case the following Exception gets thrown when accessing the RequestScope:
> javax.enterprise.context.ContextNotActiveException: WebBeans context
> with scope type annotation @RequestScoped does not exist within
> current thread
>        at org.apache.webbeans.container.BeanManagerImpl.getContext(BeanManagerImpl.java:341)
>        at org.apache.webbeans.intercept.NormalScopedBeanInterceptorHandler.getContextualInstance(NormalScopedBeanInterceptorHandler.java:124)
>        at org.apache.webbeans.intercept.NormalScopedBeanInterceptorHandler.invoke(NormalScopedBeanInterceptorHandler.java:95)

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira