Connecting to multi-instance queue managers using CONNECTIONNAMELIST

Automatic client reconnection can be used by the IBM® MQ classes for JMS applications that connect to a multi-instance queue manager.

If the queue manager instance that an application is using becomes unavailable, the IBM MQ classes for JMS can automatically try to connect to the standby instance on behalf of the application. The application blocks while the automatic client reconnection is taking place, and resumes when the IBM MQ classes for JMS establish a connection to the standby queue manager.

To enable automatic client reconnection for a multi-instance queue manager, set the following properties on the Connection Factory that is used by the IBM MQ classes for JMS application:
CHANNEL
The name of a server connection channel defined on the queue manager.
QMANAGER

The name of the multi-instance queue manager.

CONNECTIONNAMELIST=host1(port1), host2(port2).

The first entry in the list must contain the host name and the port that is used to contact the primary queue manager instance. The second entry should contain the hostname, and the port of the system where the standby queue manager instance is located.

CLIENTRECONNECTOPTIONS=QMGR.

This ensures that the IBM MQ classes for JMS tries to reconnect to a queue manager that has the same name as the queue manager that the application was previously connected to.