The XA reconnect is performed as part of the processing in the SEP. See Enterprise Server SEP XA Reconnect for more information. If the environment variable ES_XA_RECONNECT is set to any value, the system will attempt to reconnect to an XA resource when the connection is lost. In the context of a MIQM configuration where connection to the active instance is lost, if the ES_XA_MQ is set to MIQM then the XA reconnect processing in the SEP will attempt to switch to the newly active MQ instance.
To further configure XA reconnect for an MIQM, you must specify three environment variable ES_XA_RECONNECT, ES_XA_MQ, and MQSERVER.
The environment variable ES_XA_MQ is used to enable the reconnection to the standby queue manager when the connection to the active queue manager is lost:
In addition, the environment variable MQSERVER must be set so that the system can verify that at least 2 connections are listed. For example:
To enable the system to connect to the active queue manager in an MIQM at region startup, an XA entry must be created that will point to the first address listed in the MQSERVER environment variable.
The following is an example XA entry for an active MIQM MQ instance:
ID: MQPROD Open string TPM=ESCICS,AXLIB=casaxlib,QMNAME=MIQM001,uid=mq01@MYCORPDOM,pwd=MQadmin,CHANNEL=CHANNEL1,TRPTYPE=TCP,CONNAME=10.120.99.999(1414)
At the point XA entries are installed, the system will create an XA entry for the standby entry which will be identical to the active definition except for the name and the CONNAME.
If the example MQPROD is already specified then the dynamically created instance entry will be:
ID: MQPRO# Open string TPM=ESCICS,AXLIB=casaxlib,QMNAME=MIQM001,uid=mq01@MYCORPDOM,pwd=MQadmin,CHANNEL=CHANNEL1,TRPTYPE=TCP,CONNAME=10.120.88.888(1414)
Where the ID and the CONNAME is different. This entry will be installed but will not be activated until the connection to the first active instance is lost. When this connection loss takes place, the active connection will be replaced with that of the standby MQ instance which now becomes active and the previously active instance become the standby instance.
Both connections appear active but only the active one is enrolled in the XA transaction.