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


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

        

Reply via email to