3 Replies Latest reply on Aug 5, 2008 9:39 AM by bfach

    JMS Reconnect ability

    bfach

      Hello,

      I am attempting to make a standalone java application reconnect to JBoss in the event that it dies. I found the jboss wiki detailing the exception listener interface and implementing this. This method works for a regular ConnectionFactory however not for a clustered ConnectionFactory.

      I am using JBoss4.2.2.GA with 1.4.0.SP3 CP02.

      The test that is run is as follows:

      1- Start Jboss
      2- Connect via client app
      3- Stop Jboss
      4- Observe reconnect attempt by client app
      5- Restart jboss
      6- Observe messages being processed in jboss again

      The above occurs once but upon the second attempt, the exception listener is not called.

      Thanks!

      Brad

        • 1. Re: JMS Reconnect ability
          ataylor

          If you use a clustered connection factory and set 'supportsfailover' to true, the client will reconnect to another node transparently.

          • 2. Re: JMS Reconnect ability
            bfach

            This is true however this is in the event that you have 1 node in a cluster. I want the ability to reconnect to the same node in the event that it dies and is restarted. The reconnect works everytime with a ConnectionFactory but not for the ClusteredConnectionFactory.

            Sorry for the late reply as I was away for a week.

            • 3. Re: JMS Reconnect ability
              bfach

              To be clear on what I am attempting. Failover is not the issue here. I am not trying to test the failover capability if there are 2+ nodes in a cluster but rather what occurs in the event that there is 1 node and it dies.