Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Auto Closed
-
None
-
None
-
None
-
None
Description
I'll try to post some code later, but we ran into this bug today.
We have an Instance<MyTask>, which is submitting MyTask to a ManagedExecutorService. The MyTask gets a JMXContext injected into it. So basically neither a RequestScope or TXScope exist.
I'm not sure what the correct behavior should be according to the JMS2 spec, but if there's a problem, it's probably because we're limited to thse two choices:
private synchronized JMSContext context() { if (inTx()) { return findOrCreateContext(transactionStorage); } return findOrCreateContext(requestStorage); }
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:335) at org.apache.webbeans.intercept.NormalScopedBeanInterceptorHandler.getContextualInstance(NormalScopedBeanInterceptorHandler.java:89) at org.apache.webbeans.intercept.RequestScopedBeanInterceptorHandler.getContextualInstance(RequestScopedBeanInterceptorHandler.java:76) at org.apache.webbeans.intercept.NormalScopedBeanInterceptorHandler.get(NormalScopedBeanInterceptorHandler.java:71) at org.apache.openejb.resource.activemq.jms2.cdi.JMS2CDIExtension$RequestAutoContextDestruction$$OwbNormalScopeProxy0.find(org/apache/openejb/resource/activemq/jms2/cdi/JMS2CDIExtensio n$RequestAutoContextDestruction.java) at org.apache.openejb.resource.activemq.jms2.cdi.JMS2CDIExtension$InternalJMSContext.findOrCreateContext(JMS2CDIExtension.java:270) at org.apache.openejb.resource.activemq.jms2.cdi.JMS2CDIExtension$InternalJMSContext.context(JMS2CDIExtension.java:266) at org.apache.openejb.resource.activemq.jms2.cdi.JMS2CDIExtension$InternalJMSContext.createTopic(JMS2CDIExtension.java:425)