Uploaded image for project: 'JBoss Enterprise Application Platform'
  1. JBoss Enterprise Application Platform
  2. JBEAP-11210

Cannot deploy JMS bridge after reload when source-context={} and target-context={}

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Minor
    • 7.1.0.ER2
    • 7.1.0.DR19
    • JMS
    • None
    • Hide
      • Leave target-context or source-context undefined when local JNDI context should be used. Do not define it as {}
      • set max-retries to -1 or higher positive value and bridge connects when queue is created on local server
      Show
      Leave target-context or source-context undefined when local JNDI context should be used. Do not define it as {} set max-retries to -1 or higher positive value and bridge connects when queue is created on local server
    • Hide
      1. start EAP in standalone-full-ha.xml profile
      2. using cli, add queues and bridge
        /subsystem=messaging-activemq/server=default/jms-queue=InQueue:add(durable=false, entries=[java:/jms/queue/InQueue])
        /subsystem=messaging-activemq/server=default/jms-queue=OutQueue:add(durable=false, entries=[java:/jms/queue/OutQueue])
        /subsystem=messaging-activemq/jms-bridge=test:add(quality-of-service=AT_MOST_ONCE, failure-retry-interval=1000, max-retries=1, max-batch-size=1000, max-batch-time=1000, source-connection-factory=java:/ConnectionFactory, source-destination=java:/jms/queue/InQueue, source-context={}, target-connection-factory=java:/ConnectionFactory, target-destination=java:/jms/queue/OutQueue, target-context={})
        
      3. reload server
      Show
      start EAP in standalone-full-ha.xml profile using cli, add queues and bridge /subsystem=messaging-activemq/server=default/jms-queue=InQueue:add(durable=false, entries=[java:/jms/queue/InQueue]) /subsystem=messaging-activemq/server=default/jms-queue=OutQueue:add(durable=false, entries=[java:/jms/queue/OutQueue]) /subsystem=messaging-activemq/jms-bridge=test:add(quality-of-service=AT_MOST_ONCE, failure-retry-interval=1000, max-retries=1, max-batch-size=1000, max-batch-time=1000, source-connection-factory=java:/ConnectionFactory, source-destination=java:/jms/queue/InQueue, source-context={}, target-connection-factory=java:/ConnectionFactory, target-destination=java:/jms/queue/OutQueue, target-context={}) reload server

    Description

      Jms bridge can not be deployed on first attempt when both source-context={} and target-context={}. It happens only on server start (or after reload) and only when both source-context and target-context are defined as {}. When at least one of them is undefined, bridge is deployed correctly.

      It seems like timing issue, when bridge is looking for queue which is not yet created.

      Priority is set to minor, because you don't need to specify target/ source context when local context is supposed to be used. You might also specify higher max-retries on bridge and then it connects when queue is created on local server.

      Following is warning print on server startup

      13:24:39,827 WARN  [org.apache.activemq.artemis.jms.bridge] (Thread-93) AMQ342010: Failed to connect JMS Bridge N/A: javax.naming.NameNotFoundException: jms/queue/InQueue [Root exception is java.lang.IllegalStateException]
      	at org.jboss.as.naming.ServiceBasedNamingStore.lookup(ServiceBasedNamingStore.java:153) [wildfly-naming-7.1.0.Beta1-redhat-4.jar:7.1.0.Beta1-redhat-4]
      	at org.jboss.as.naming.ServiceBasedNamingStore.lookup(ServiceBasedNamingStore.java:83) [wildfly-naming-7.1.0.Beta1-redhat-4.jar:7.1.0.Beta1-redhat-4]
      	at org.jboss.as.naming.NamingContext.lookup(NamingContext.java:207) [wildfly-naming-7.1.0.Beta1-redhat-4.jar:7.1.0.Beta1-redhat-4]
      	at org.jboss.as.naming.InitialContext$DefaultInitialContext.lookup(InitialContext.java:237) [wildfly-naming-7.1.0.Beta1-redhat-4.jar:7.1.0.Beta1-redhat-4]
      	at org.jboss.as.naming.NamingContext.lookup(NamingContext.java:193) [wildfly-naming-7.1.0.Beta1-redhat-4.jar:7.1.0.Beta1-redhat-4]
      	at org.jboss.as.naming.NamingContext.lookup(NamingContext.java:189) [wildfly-naming-7.1.0.Beta1-redhat-4.jar:7.1.0.Beta1-redhat-4]
      	at javax.naming.InitialContext.lookup(InitialContext.java:417) [rt.jar:1.8.0_65]
      	at javax.naming.InitialContext.lookup(InitialContext.java:417) [rt.jar:1.8.0_65]
      	at org.apache.activemq.artemis.jms.bridge.impl.JNDIFactorySupport.createObject(JNDIFactorySupport.java:46) [artemis-jms-server-1.5.5.001-redhat-1.jar:1.5.5.001-redhat-1]
      	at org.apache.activemq.artemis.jms.bridge.impl.JNDIDestinationFactory.createDestination(JNDIDestinationFactory.java:32) [artemis-jms-server-1.5.5.001-redhat-1.jar:1.5.5.001-redhat-1]
      	at org.apache.activemq.artemis.jms.bridge.impl.JMSBridgeImpl.setupJMSObjects(JMSBridgeImpl.java:1070) [artemis-jms-server-1.5.5.001-redhat-1.jar:1.5.5.001-redhat-1]
      	at org.apache.activemq.artemis.jms.bridge.impl.JMSBridgeImpl.setupJMSObjectsWithRetry(JMSBridgeImpl.java:1247) [artemis-jms-server-1.5.5.001-redhat-1.jar:1.5.5.001-redhat-1]
      	at org.apache.activemq.artemis.jms.bridge.impl.JMSBridgeImpl.access$2600(JMSBridgeImpl.java:75) [artemis-jms-server-1.5.5.001-redhat-1.jar:1.5.5.001-redhat-1]
      	at org.apache.activemq.artemis.jms.bridge.impl.JMSBridgeImpl$FailureHandler.run(JMSBridgeImpl.java:1747) [artemis-jms-server-1.5.5.001-redhat-1.jar:1.5.5.001-redhat-1]
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [rt.jar:1.8.0_65]
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [rt.jar:1.8.0_65]
      	at java.lang.Thread.run(Thread.java:745) [rt.jar:1.8.0_65]
      Caused by: java.lang.IllegalStateException
      	at org.jboss.msc.value.InjectedValue.getValue(InjectedValue.java:47) [jboss-msc-1.2.7.SP1-redhat-1.jar:1.2.7.SP1-redhat-1]
      	at org.jboss.as.naming.service.BinderService.getValue(BinderService.java:142) [wildfly-naming-7.1.0.Beta1-redhat-4.jar:7.1.0.Beta1-redhat-4]
      	at org.jboss.as.naming.service.BinderService.getValue(BinderService.java:46) [wildfly-naming-7.1.0.Beta1-redhat-4.jar:7.1.0.Beta1-redhat-4]
      	at org.jboss.msc.service.ServiceControllerImpl.getValue(ServiceControllerImpl.java:1158) [jboss-msc-1.2.7.SP1-redhat-1.jar:1.2.7.SP1-redhat-1]
      	at org.jboss.as.naming.ServiceBasedNamingStore.lookup(ServiceBasedNamingStore.java:131) [wildfly-naming-7.1.0.Beta1-redhat-4.jar:7.1.0.Beta1-redhat-4]
      	... 16 more
      13:24:39,828 WARN  [org.apache.activemq.artemis.jms.bridge] (Thread-93) AMQ342005: JMS Bridge N/A unable to set up connections, bridge will not be started
      
      

      Attachments

        Issue Links

          Activity

            People

              jmesnil1@redhat.com Jeff Mesnil
              mstyk_jira Martin Styk (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: