Uploaded image for project: 'Application Server 7'
  1. Application Server 7
  2. AS7-3107

CDI scopes should be available any message delivery to a MessageListener for a JMS topic or queue obtained from the Java EE component environment.

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Won't Do
    • None
    • None
    • CDI / Weld, JMS
    • None

    Description

      From Martin Kouba:

      I'm just working on CDI TCK tests related to JMS and buil-in contexts - sections "6.7.1. Request context lifecycle" and "6.7.3. Application context lifecycle".

      I found out that MDBs work great - request and app contexts are active during message delivery and request context is destroyed after message delivery completes.

      However request and app contexts should also be active during "any message delivery to a MessageListener for a JMS topic or queue obtained from the Java EE component environment.".

      I get following stacktrace (LoggerService is request scoped bean injected into dependent bean that is registered as javax.jms.MessageListener):

      15:10:34,368 WARN [org.hornetq.jms.client.JMSMessageListenerWrapper] (Thread-1 (group:HornetQ-client-global-threads-2012075375)) Unhandled exception thrown from onMessage: java.lang.IllegalStateException: Singleton not set for ModuleClassLoader for Module "org.hornetq:main" from local module loader @32b0bad7 (roots: /opt/jboss/jboss-as-weld2/modules)
      at org.jboss.as.weld.services.ModuleGroupSingletonProvider$TCCLSingleton.get(ModuleGroupSingletonProvider.java:73)
      at org.jboss.weld.Container.instance(Container.java:54)
      at org.jboss.weld.bean.proxy.ContextBeanInstance.getInstance(ContextBeanInstance.java:67)
      at org.jboss.weld.bean.proxy.ProxyMethodHandler.invoke(ProxyMethodHandler.java:79)
      at org.jboss.jsr299.tck.tests.context.jms.LoggerService$Proxy$$$_WeldClientProxy.log(LoggerService$Proxy$$$_WeldClientProxy.java)
      at org.jboss.jsr299.tck.tests.context.jms.AbstractMessageListener.onMessage(AbstractMessageListener.java:19)
      at org.hornetq.jms.client.JMSMessageListenerWrapper.onMessage(JMSMessageListenerWrapper.java:91) [hornetq-jms-2.2.7.Final.jar:]
      at org.hornetq.core.client.impl.ClientConsumerImpl.callOnMessage(ClientConsumerImpl.java:866) [hornetq-core-2.2.7.Final.jar:]
      at org.hornetq.core.client.impl.ClientConsumerImpl.access$100(ClientConsumerImpl.java:44) [hornetq-core-2.2.7.Final.jar:]
      at org.hornetq.core.client.impl.ClientConsumerImpl$Runner.run(ClientConsumerImpl.java:983) [hornetq-core-2.2.7.Final.jar:]
      at org.hornetq.utils.OrderedExecutorFactory$OrderedExecutor$1.run(OrderedExecutorFactory.java:100) [hornetq-core-2.2.7.Final.jar:]
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) [:1.6.0_22]
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) [:1.6.0_22]
      at java.lang.Thread.run(Thread.java:679) [:1.6.0_22]

      Do you know what's happening? Is this feature already implemented in weld/AS7.1 integration?

      Attachments

        Issue Links

          Activity

            People

              sdouglas1@redhat.com Stuart Douglas
              sdouglas1@redhat.com Stuart Douglas
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: