Uploaded image for project: 'WildFly'
  1. WildFly
  2. WFLY-9305

ActiveMQ Resource Adapter can not lookup destination in app namespace

    XMLWordPrintable

Details

    • Workaround Exists
    • Hide

      Specify an explicit destinationName in the @JMSDestinationDefinition so that ActiveMQ resource adapter can create the destination from its name (instead of looking up in JNDI)

      Show
      Specify an explicit destinationName in the @JMSDestinationDefinition so that ActiveMQ resource adapter can create the destination from its name (instead of looking up in JNDI)

    Description

      When using JMSDefinition defining a non-global JNDI name, Queue/Topic isn't created and MDB listening to those won't read incoming messages.

      Example using non global JNDI (this doesn't work ):

      @JMSDestinationDefinition(
          name = "java:app/jms/queue", 
          interfaceName = "javax.jms.Queue"
      )
      

      Example using global JNDI (this works ):

      @JMSDestinationDefinition(
          name = "java:/app/jms/queue", 
          interfaceName = "javax.jms.Queue"
      )
      

      When using the non-global JNDI and deploying, a message like this can be seen:

      13:20:15,542 INFO  [org.apache.activemq.artemis.ra] (default-threads - 2) AMQ151001: Attempting to reconnect org.apache.activemq.artemis.ra.inflow.ActiveMQActivationSpec(ra=org.apache.activemq.artemis.ra.ActiveMQResourceAdapter@78712571 destination=java:app/jms/queue destinationType=javax.jms.Queue ack=Auto-acknowledge durable=false clientID=null user=null maxSession=15)
      

      and creating an MDB to listen sent messages won't receive any.

      Attached a reproducer WAR Maven project. Just deploy, access index.xhtml, click on "Test" button and check logs.

      Attachments

        Issue Links

          Activity

            People

              ehugonne1@redhat.com Emmanuel Hugonnet
              jmesnil1@redhat.com Jeff Mesnil
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: