4 Replies Latest reply on Aug 20, 2010 10:19 AM by Joydeep Sarkar

    JMS listener not working

    Joydeep Sarkar Newbie



      It appears that in the backup server, after the failover happens, the listeners are not working.


      When the failover hppens, the JMX console shows that the messages are going to the testQueue and then moved to ExpiryQueue.

      Now I have two MDBs listening to both testQueue and ExpiryQueue and the messages have stalled in the testQueue. Neither it is being processed nor it is moved to ExpirtQueue.


      But the same setup is able to process the messages in the Live server.


      Any idea why this is happeing? What is preventing the MDBs to listen to the Queue in the backup server?


      Following is the MDB,

         name = "FailoverTestMDEJB",  mappedName="jms/Queue",
         activationConfig = {
                      propertyName = "destinationType", propertyValue = "javax.jms.Queue"),
                      //propertyName = "destination", propertyValue = "/queue/oracleXMLQueue"),
                      propertyName = "destination", propertyValue = "/queue/ExpiryQueue"),
              @ActivationConfigProperty(propertyName = "acknowledgeMode", propertyValue = "Auto-acknowledge"),
              @ActivationConfigProperty(propertyName = "maxSession", propertyValue = "2")
              } )
      public class FailoverTestMDBean implements MessageListener {
          public FailoverTestMDBean() {
          public void onMessage(Message msg) {
              if (msg instanceof TextMessage){
                      TextMessage tmsg = (TextMessage) msg;
              }catch(JMSException jmse){




        • 1. Re: JMS listener not working
          Joydeep Sarkar Newbie

          Alright, there are apparently two aspects,


          One is to specify netty factory in the ra.xml as follows,

                   <description>The transport type</description>
          <!--         <config-property-value>org.hornetq.core.remoting.impl.invm.InVMConnectorFactory</config-property-value> -->
                   <description>The transport configuration. These values must be in the form of key=val;key=val;</description>
          <!--         <config-property-value>server-id=0</config-property-value> -->



          Another is the in-vm acceptor in hornetq-configuration.xml

                <acceptor name="netty">
                   <param key="host"  value="${hornetq.remoting.netty.host:}"/>
                   <param key="port"  value="${hornetq.remoting.netty.port:5445}"/>
               <acceptor name="in-vm">
                  <param key="server-id" value="0"/>



          In both the cases I mentioned above, the MDB is able to listen to the queue successfully.

          BUT, they activate the backup server at the time of startup itself!

          I do not understand if this a bug or a fault of my configuration, but this really has stopped my work since I am not able to proceed with Live-Backup pair.

          Is there any workaround/fix for this?

          Please help.


          Looking forward to your response.




          • 2. Re: JMS listener not working
            Tim Fox Master

            Did you read the dev forum thread on HA improvements that's been mentioned several times?

            • 3. Re: JMS listener not working
              Joydeep Sarkar Newbie

              Well, to be honest I have not.

              Good to hear that improvements are on. So is this issue also being addressed?

              Just wanted to know if any workaround is available to get my work going. Else I will have to simply wait for the improvements to be over.

              I hope you understand.



              • 4. Re: JMS listener not working
                Joydeep Sarkar Newbie

                Hello Tim,


                I have just had a look at the discussion in dev forum, but I do not see any point addressing this issue.

                Please let me know if this a bug for which a JIRA needs to be raised or this is a problem on my part.

                Do you see any workaround for this problem till the enhancements are done?

                What is the targeted date of release of 2.2?