Reconnect

Help
2003-05-05
2003-05-05
  • Knu Lerpold
    Knu Lerpold
    2003-05-05

    Im using a generic tool written in pure JMS.
    When the connection to the server drops Im using onException() to close all connection to server and then perform a new connection and are setting all listeners on the new connection.
    This is working but takes LOOOONG time (between 4 and 7 minutes).. why ???

    Im actualy waiting for the statment ....setMessageListener(this)..

    11:13:55,686 ERROR [Channel-Based NIO Thread] no.lerpold.jos.init.DefaultConnection:113     - Got an exception. Ill try to reconnect 3 times then die. To change this do your own implementation.
    com.ubermq.jms.client.JMSIOException:
            at com.ubermq.jms.client.impl.Connection.connectionEvent(Connection.java:372)
            at com.ubermq.kernel.AbstractConnectionInfo.sendEvent(AbstractConnectionInfo.java:173)
            at com.ubermq.kernel.AbstractConnectionInfo.sendEvent(AbstractConnectionInfo.java:188)
            at com.ubermq.kernel.ConnectionInfo.readFrom(ConnectionInfo.java:83)
            at com.ubermq.kernel.ReadWriteTransformThread.acceptPendingRequests(ReadWriteTransformThread.java:123)
            at com.ubermq.kernel.ReadWriteTransformThread.run(ReadWriteTransformThread.java:51)
    11:13:56,638 WARN  [Channel-Based NIO Thread] no.lerpold.jos.init.DefaultConnection:65     - JMSException in createQueueConnection, trying to reconnect.
    11:14:02,646 WARN  [Channel-Based NIO Thread] no.lerpold.jos.init.DefaultConnection:65     - JMSException in createQueueConnection, trying to reconnect.
    11:14:08,185 INFO  [Channel-Based NIO Thread] no.lerpold.jos.init.DefaultProducer:48     - Connected...
    11:14:08,185 INFO  [Channel-Based NIO Thread] no.lerpold.jos.init.DefaultConsumer:48     - Connected...
    <----    is trying to set the messageListener  --->
    11:20:48,232 DEBUG [Session Delivery Thread] no.lerpold.jos.init.DefaultConsumer:63     - Start
    11:20:48,232 DEBUG [Session Delivery Thread] no.lerpold.jos.init.DefaultFormat:47     - Start
    11:20:48,232 DEBUG [Session Delivery Thread] no.lerpold.jos.init.DefaultFormat:50     - TextMessage --> Hello world2
    11:20:48,232 DEBUG [Session Delivery Thread] no.lerpold.jos.init.DefaultFormat:58     - End
    11:20:48,232 DEBUG [Session Delivery Thread] no.lerpold.jos.test.TestJOSConsumer:31     - Start
    11:20:48,232 INFO  [Session Delivery Thread] no.lerpold.jos.test.TestJOSConsumer:34     - String --> Hello world2

    Knut