2 Replies Latest reply on Apr 4, 2013 9:59 AM by shura_gk

    Durable Topic Subscriber

    shura_gk Newbie

      Hi All,

       

      I am trying to migrate several applications from Glassfish to JBoss AS 7.1.1.  Right now, I'm struggling with the JMS Topic conversion.  We have a single topic with various connection factories for the subscribers.  However, these subscriptions must be durable, and the ClientID is being reported as null, even though it is set in the standalone.xml file, and is not overwritten during restart.  My code/configuration is below.

       

      The ConnectionFactory in standalone.xml:

       

      <connection-factory name="jms/ARMChangeConnectionFactory_TPALS">

           <connectors>

                <connector-ref connector-name="netty"/>

           </connectors>

           <entries>

                <entry name="jms/ARMChangeConnectionFactory_TPALS"/>

                <entry name="java:jboss/exported/jms/ARMChangeConnectionFactory_TPALS"/>

           </entries>

           <client-id>TPALS</client-id>

           <user>guest</user>

           <password>guest1</password>

      </connection-factory>

       

      The Topic:

       

      <jms-topic name="ARMChangeTopic">

           <entry name="jms/ARMChangeTopic"/>

           <entry name="java:jboss/exported/jms/topic/ARMChangeTopic"/>

      </jms-topic>

       

      The MDB

       

      @MessageDriven(name="personUpdateServiceJMSListener",

              mappedName = ARMPublisher.ARM_JMS_PROPAGATE_TOPIC,

              activationConfig=

                      {@ActivationConfigProperty(propertyName="destinationType", propertyValue="javax.jms.Topic"),

                       @ActivationConfigProperty(propertyName="destination", propertyValue="armQ"),

                       @ActivationConfigProperty(propertyName="subscriptionDurability", propertyValue="Durable"),

                       @ActivationConfigProperty(propertyName="subscriptionName", propertyValue="jms/ARMChangeConnectionFactory_TPALS"),

                       @ActivationConfigProperty(propertyName="ClientId", propertyValue = "TPALS"),

                       @ActivationConfigProperty(propertyName="user", propertyValue = "guest"),

                       @ActivationConfigProperty(propertyName="password", propertyValue = "guest1")})

       

      When I enable my application in the management console, I get the following:

      ERROR [org.hornetq.ra.inflow.HornetQActivation] (default-short-running-threads-threads - 4) Unable to reconnect org.hornetq.ra.inflow.HornetQActivationSpec(ra=org.hornetq.ra.HornetQResourceAdapter@34451610 destination=armQ destinationType=javax.jms.Topic ack=Auto-acknowledge durable=true clientID=null subscription=/jms/ARMChangeConnectionFactory_TPALS user=guest password=**** maxSession=15): javax.jms.InvalidClientIDException: Cannot create durable subscription for /jms/ARMChangeConnectionFactory_TPALS - client ID has not been set

              at org.hornetq.ra.inflow.HornetQMessageHandler.setup(HornetQMessageHandler.java:111) [hornetq-ra-2.2.13.Final.jar:]

              at org.hornetq.ra.inflow.HornetQActivation.setup(HornetQActivation.java:296) [hornetq-ra-2.2.13.Final.jar:]

              at org.hornetq.ra.inflow.HornetQActivation.handleFailure(HornetQActivation.java:566) [hornetq-ra-2.2.13.Final.jar:]

              at org.hornetq.ra.inflow.HornetQActivation$SetupActivation.run(HornetQActivation.java:609) [hornetq-ra-2.2.13.Final.jar:]

              at org.jboss.jca.core.workmanager.WorkWrapper.run(WorkWrapper.java:212)

              at org.jboss.threads.SimpleDirectExecutor.execute(SimpleDirectExecutor.java:33)

              at org.jboss.threads.QueueExecutor.runTask(QueueExecutor.java:801)

              at org.jboss.threads.QueueExecutor.access$100(QueueExecutor.java:45)

              at org.jboss.threads.QueueExecutor$Worker.run(QueueExecutor.java:821)

              at java.lang.Thread.run(Thread.java:662) [rt.jar:1.6.0_22]

              at org.jboss.threads.JBossThread.run(JBossThread.java:122)

       

      Can any one point me to the problem, or some documentation on durable subscribers? 

       

      Thanks in advance.