3 Replies Latest reply on Nov 17, 2008 2:36 AM by oichris

    Client reconnection

      Dear All,

      May I know if there is any configuration that can make an automatic retry on fail of JMS connection ?

      My scenario now is I use JMSRouter to forward message to a SonicMQ queue, when it is up, everything is fine. When the SonicMQ server is done/connection is dropped, the JBossESB is not able to detect it (understandable), and throws exception when it tries to send message to the SonicMQ. After the SonicMQ is up again, the connection will not re-establish (understandable) and keeps the old one and thus exception return.

      The question I have here is : is it possible to close the connection when it detects that the destination/target is not available at the moment(When the first exception return), so that next time when the client tries to get the connection and send message, it knows it should establish a new connection.

      Or any workaround?

      Thanks a lot.

        • 1. Re: Client reconnection

          When the SonicMQ server is done/connection is dropped <--- I mean when the SonicMQ server is DOWN (not done)

          • 2. Re: Client reconnection
            kconner

            From a cursory look at that class I can see a couple of issues.

            You are correct in that the class does not attempt to re-establish a producer for the destination, something it should be doing. The error with the connection would have been detected in the pooling code and any associated producer/session/connection would all have been closed.

            The other issue appears to be that it is sharing a session/producer across multiple threads and this is not safe. JMS Sessions are intended to be single threaded objects, as are the producers they create.

            I'll create some issues to cover these and get them fixed as soon as possible.

            Apologies for this.

            Kev

            • 3. Re: Client reconnection

               

              "Kevin.Conner@jboss.com" wrote:
              From a cursory look at that class I can see a couple of issues.

              You are correct in that the class does not attempt to re-establish a producer for the destination, something it should be doing. The error with the connection would have been detected in the pooling code and any associated producer/session/connection would all have been closed.

              The other issue appears to be that it is sharing a session/producer across multiple threads and this is not safe. JMS Sessions are intended to be single threaded objects, as are the producers they create.

              I'll create some issues to cover these and get them fixed as soon as possible.

              Apologies for this.

              Kev


              Dear Kev,

              I am so glad that finally there is some people from jboss proving that it is not my fault in configuring the jboss appropriately.
              Really look forward to any updated information on this issue.

              Thanks a lot.