Uploaded image for project: 'WildFly WIP'
  1. WildFly WIP
  2. WFWIP-26

[Artemis 2.x Upgrade] MDB doesn't find its source queue when useJndi property is set to false

XMLWordPrintable

    • Hide
      git clone git://git.app.eng.bos.redhat.com/jbossqe/eap-tests-hornetq.git
      cd eap-tests-hornetq/scripts/
      groovy -DEAP_ZIP_URL=<CURRENT_DIST_URL> PrepareServers7.groovy
      export WORKSPACE=$PWD
      export JBOSS_HOME_1=$WORKSPACE/server1/jboss-eap
      export JBOSS_HOME_2=$WORKSPACE/server2/jboss-eap
      export JBOSS_HOME_3=$WORKSPACE/server3/jboss-eap
      export JBOSS_HOME_4=$WORKSPACE/server4/jboss-eap
      
      cd ../jboss-hornetq-testsuite/
      mvn clean test -Dtest=ActivationConfigPropertiesTestCase#useJndiTest -Deap7.org.jboss.qa.hornetq.apps.clients.version=<CLIENT_VERSION> | tee log
      
      Show
      git clone git://git.app.eng.bos.redhat.com/jbossqe/eap-tests-hornetq.git cd eap-tests-hornetq/scripts/ groovy -DEAP_ZIP_URL=<CURRENT_DIST_URL> PrepareServers7.groovy export WORKSPACE=$PWD export JBOSS_HOME_1=$WORKSPACE/server1/jboss-eap export JBOSS_HOME_2=$WORKSPACE/server2/jboss-eap export JBOSS_HOME_3=$WORKSPACE/server3/jboss-eap export JBOSS_HOME_4=$WORKSPACE/server4/jboss-eap cd ../jboss-hornetq-testsuite/ mvn clean test -Dtest=ActivationConfigPropertiesTestCase#useJndiTest -Deap7.org.jboss.qa.hornetq.apps.clients.version=<CLIENT_VERSION> | tee log

      Having a MDB configured as follows:

      @MessageDriven(name = "mdb",
              activationConfig = {
                      @ActivationConfigProperty(propertyName = "destinationType", propertyValue = "javax.jms.Queue"),
                      @ActivationConfigProperty(propertyName = "destination", propertyValue ="InQueue"),
                      @ActivationConfigProperty(propertyName = "useJNDI", propertyValue = "false"),
              })
      

      MDB is not able to receive messages from InQueue.

      Server logs:

      09:53:29,128 INFO  [org.apache.activemq.artemis.ra] (default-threads - 1) AMQ151004: Instantiating javax.jms.Queue "jms/queue/InQueue" directly since UseJNDI=false.
      09:53:29,188 INFO  [org.jboss.as.server] (management-handler-thread - 1) WFLYSRV0010: Deployed "Mdb.jar" (runtime-name : "Mdb.jar")
      09:53:29,306 INFO  [org.wildfly.naming] (default task-1) WildFly Naming version 1.0.7.Final
      09:53:29,364 INFO  [org.apache.activemq.artemis.ra] (default-threads - 1) AMQ151000: awaiting topic/queue creation jms/queue/InQueue
      09:53:31,366 INFO  [org.apache.activemq.artemis.ra] (default-threads - 1) AMQ151001: Attempting to reconnect org.apache.activemq.artemis.ra.inflow.ActiveMQActivationSpec(ra=org.wildfly.extension.messaging.activemq.ActiveMQResourceAdapter@2bd07716 destination=jms/queue/InQueue destinationType=javax.jms.Queue ack=Auto-acknowledge durable=false clientID=null user=null maxSession=15)
      09:53:31,368 INFO  [org.apache.activemq.artemis.ra] (default-threads - 1) AMQ151004: Instantiating javax.jms.Queue "jms/queue/InQueue" directly since UseJNDI=false.
      09:53:33,480 INFO  [org.apache.activemq.artemis.ra] (default-threads - 1) AMQ151004: Instantiating javax.jms.Queue "jms/queue/InQueue" directly since UseJNDI=false.
      09:53:35,092 INFO  [org.jboss.as.server] (management-handler-thread - 1) WFLYSRV0236: Suspending server with no timeout.
      

      In ActiveMQActivation.setup(), call to setupDestination() is made. Destiantion InQueue is instantiated there. However, during the ActiveMQMessageHandler.setup() call. consumer can not be created for this destination and exception AMQ119017: Queue InQueue does not exist is being thrown.

      ActiveMQActivation.setup()
      protected synchronized void setup() throws Exception {
            logger.debug("Setting up " + spec);
      
            setupCF();
      
            setupDestination();
      
            Exception firstException = null;
      
            for (int i = 0; i < spec.getMaxSession(); i++) {
               ClientSessionFactory cf = null;
               ClientSession session = null;
      
               try {
                  cf = factory.getServerLocator().createSessionFactory();
                  session = setupSession(cf);
                  ActiveMQMessageHandler handler = new ActiveMQMessageHandler(factory, this, ra.getTM(), (ClientSessionInternal) session, cf, i);
                  handler.setup();
                  handlers.add(handler);
               } catch (Exception e) {
                 ...
               }
            }
          ...
      }
      

      This is regression against Artemis 1.5.

      Wildfly: https://github.com/jmesnil/wildfly/tree/WFLY-9407_upgrade_artemis_2.4.0_with_prefix (06c878a313d3cad323889d017e60fd5533204d1a)
      Artemis: upstream master (577b62d5210cdcc0f86ab9bb1b24e944c877dfe7)

              rhn-support-jbertram Justin Bertram
              mstyk_jira Martin Styk (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

                Created:
                Updated:
                Resolved: