Confusion on fault-tolerant connections obtained from connec

Posted by Admin on 17-Apr-2009 10:29

We have a standalone JMS client that connects to our Sonic domain, gets a fault-tolerant topic connection factory and sends messages throughout the day using the a cached jms session. Every once in a while a broker will fail and a backup broker will take over. The connection failover works fine for our ESB containers, but if the standalone client had a connection open to the failed broker then the client fails as well. I've always assumed that when a client uses a fault-tolerant connection factory that the factory will automatically switch over to a new connection for the client, but I guess that is not the case. When the connection goes dead the client is failing with this error:

java.lang.IllegalStateException: Connection is not open.

Is there a standard method to handle exceptions on the client and reconnect to a new connection to prevent this error?

Thanks

All Replies

Posted by Bill Wood on 18-Oct-2009 16:16

When you make a Connection, it should be set to be "FaultTolerant".   Is that your case?

You can connect to a Fault Tolerant broker, and still not have a Fault Tolerant connection. (You would do this because you did not want any FT overhead, and/or you didn't care about FT behavior and were willing to catch connection exceptions and handle them)

This thread is closed