Interfaces to external syncpoint managers on Multiplatforms

IBM MQ for Multiplatforms supports coordination of transactions by external syncpoint managers that use the X/Open XA interface.

Some XA transaction managers (TXSeries®) require that each XA resource manager supplies its name. This is the string called name in the XA switch structure. The resource manager for IBM MQ on UNIX, Linux , and Windows is named MQSeries_XA_RMI. For IBM i, the resource manager name is MQSeries XA RMI. For further details on XA interfaces refer to the XA documentation CAE Specification Distributed Transaction Processing: The XA Specification, published by The Open Group.

In an XA configuration, IBM MQ for Multiplatforms fulfills the role of an XA resource manager. An XA syncpoint coordinator can manage a set of XA resource managers, and synchronize the commit or backout of transactions in both resource managers. This is how it works for a statically-registered resource manager:
  1. An application notifies the syncpoint coordinator that it wants to start a transaction.
  2. The syncpoint coordinator issues a call to any resource managers that it knows of, to notify them of the current transaction.
  3. The application issues calls to update the resources managed by the resource managers associated with the current transaction.
  4. The application requests that the syncpoint coordinator either commit or roll back the transaction.
  5. The syncpoint coordinator issues calls to each resource manager using two-phase commit protocols to complete the transaction as requested.

The XA specification requires each resource manager to provide a structure called an XA Switch. This structure declares the capabilities of the resource manager, and the functions that are to be called by the syncpoint coordinator.

There are two versions of this structure:

Table 1. Versions of XA Switch
Version Description
MQRMIXASwitch Static XA resource management
MQRMIXASwitchDynamic Dynamic XA resource management

For a list of the libraries containing this structure see The IBM MQ XA switch structure.

The method that must be used to link them to an XA syncpoint coordinator is defined by the coordinator; consult the documentation provided by that coordinator to determine how to enable IBM MQ to cooperate with your XA syncpoint coordinator.

The xa_info structure that is passed on any xa_open call by the syncpoint coordinator can be the name of the queue manager that is to be administered. This takes the same form as the queue manager name passed to MQCONN or MQCONNX, and can be blank if the default queue manager is to be used. However, we can use the two extra parameters TPM and AXLIB

TPM allows you to specify to IBM MQ the transaction manager name, for example, CICS®. AXLIB allows you to specify the actual library name in the transaction manager where the XA AX entry points are located.

If we use either of these parameters or a non default queue manager you must specify the queue manager name using the QMNAME parameter. For further information see The CHANNEL, TRPTYPE, CONNAME, and QMNAME parameters of the xa_open string.


Restrictions

  1. Global units of work are not allowed with a shared Hconn (as described in Shared (thread independent) connections with MQCONNX.
  2. IBM MQ for IBM i does not support dynamic registration of XA resource managers.

    The only transaction manager supported is WebSphere Application Server.

  3. On Windows systems, all functions declared in the XA switch are declared as _cdecl functions.
  4. An external syncpoint coordinator can administer only one queue manager at a time. This is because the coordinator has an effective connection to each queue manager, and is therefore subject to the rule that only one connection is allowed at a time. Note: Note: A JMS client application (CLIENT JEE application) running in a JEE server does not have this restriction, so a single JEE server-managed transaction can coordinate multiple queue managers in the same transaction. However, a JMS server application, running in bindings mode, is still subject to the rule that only one connection is allowed at a time.
  5. All applications that are run using the syncpoint coordinator can connect only to the queue manager that is administered by the coordinator because they are already effectively connected to that queue manager. They must issue MQCONN or MQCONNX to obtain a connection handle and must issue MQDISC before they exit. Alternatively, they can use the exit UE014015 for TXSeries CICS.