Automatic JMS client reconnection

Configure your JMS client to reconnect automatically following a network, queue manager, or server failure.

Normally, if a stand-alone IBM® MQ classes for JMS application is connected to a queue manager by using the client transport, and the queue manager becomes unavailable for some reason (due to a network outage, a queue manager failure, or the queue manager being stopped, for example), the IBM MQ classes for JMS will throw a JMSException the next time the application tries to communicate with the queue manager. The application must catch the JMSException and attempt to reconnect to the queue manager. You can simplify the design of the application by enabling automatic client reconnection. When the queue manager becomes unavailable, the IBM MQ classes for JMS attempts to reconnect to the queue manager automatically on behalf of the application. This means that the application does not need to contain logic to reconnect.

The use of this implementation of automatic client reconnection is not supported within Java Platform, Enterprise Edition application servers. See Using automatic client reconnection in Java EE environments for an alternative implementation.