Uploaded image for project: 'JBoss Enterprise Application Platform 4 and 5'
  1. JBoss Enterprise Application Platform 4 and 5
  2. JBPAPP-10918

Property substitution in MDB activation config doesn't work if destination's JNDI name is specified with it and create-destination is used in jboss.xml

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • EAP_EWP 5.3.0.ER1
    • None
    • EJB
    • None
    • Not Required
    • NEW

    Description

      I found this with my custom '5.3' build. Property substitution (as of JBPAPP-10820) in MDB's annotation based activationConfig gets confused if the MDB also uses a jboss.xml file which tells that the JMS destination should be created automatically when the MDB is being deployed (<create-destination>true</create-destination>). Reproducer attached.

      How to reproduce:

      • compile the reproducer (mvn package)
      • do NOT create any JMS queues in EAP5's configuration
      • run EAP5 specifying the JNDI name for the queue using a system property:
         ./run.sh -c all -Dmdb.queue=queue/QueueForNew 
      • Deploy the jar
      • There are two message driven beans in the reproducer:
      • The NewMDB should have its queue (queue/QueueForNew) created (as specified in jboss.xml), but it will not.
      • The NormalMDB, which doesn't use property substitution, has its queue (queue/QueueForOld) created properly and starts working.

      Expected outcome:

      10:37:28,306 INFO  [QueueService] Queue[queue/QueueForNew, name=queue.QueueForNew] started, fullSize=200000, pageSize=2000, downCacheSize=2000
      10:37:28,327 INFO  [EJBContainer] STARTED EJB: mdb.NewMDB ejbName: NewMDB
      

      Actual outcome:

      10:37:28,228 INFO  [QueueService] Queue[${mdb.queue}] started, fullSize=200000, pageSize=2000, downCacheSize=2000
      10:37:28,289 WARN  [JmsActivation] Failure in jms activation org.jboss.resource.adapter.jms.inflow.JmsActivationSpec@1886f88c(ra=org.jboss.resource.adapter.jms.JmsResourceAdapter@69bdf5c destination=queue/QueueForNew destinationType=javax.jms.Queue tx=true durable=false reconnectInterval=10 reconnectAttempts=5 provider=java:/DefaultJMSProvider user=null maxMessages=1 minSession=1 maxSession=15 keepAlive=60000 useDLQ=true DLQHandler=org.jboss.resource.adapter.jms.inflow.dlq.GenericDLQHandler DLQJndiName=queue/DLQ DLQUser=null DLQMaxResent=5)
      javax.naming.NameNotFoundException: QueueForNew not bound
              at org.jnp.server.NamingServer.getBinding(NamingServer.java:771)
              at org.jnp.server.NamingServer.getBinding(NamingServer.java:779)
              at org.jnp.server.NamingServer.getObject(NamingServer.java:785)
              at org.jnp.server.NamingServer.lookup(NamingServer.java:443)
              at org.jnp.server.NamingServer.lookup(NamingServer.java:399)
              at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:753)
              at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:713)
              at javax.naming.InitialContext.lookup(InitialContext.java:411)
              at org.jboss.util.naming.Util.lookup(Util.java:222)
              at org.jboss.resource.adapter.jms.inflow.JmsActivation.setupDestination(JmsActivation.java:466)
              at org.jboss.resource.adapter.jms.inflow.JmsActivation.setup(JmsActivation.java:354)
              at org.jboss.resource.adapter.jms.inflow.JmsActivation$SetupActivation.run(JmsActivation.java:813)
              at org.jboss.resource.work.WorkWrapper.execute(WorkWrapper.java:205)
              at org.jboss.util.threadpool.BasicTaskWrapper.run(BasicTaskWrapper.java:260)
              at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
              at java.lang.Thread.run(Thread.java:724)
      

      Attachments

        Issue Links

          Activity

            People

              chaowan@redhat.com Chao Wang
              jmartisk@redhat.com Jan Martiska
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: