External syncpoint coordination

A global unit of work can also be coordinated by an external X/Open XA-compliant transaction manager. Here the WebSphere MQ queue manager participates in, but does not coordinate, the unit of work.

The flow of control in a global unit of work coordinated by an external transaction manager is as follows:

  1. An application tells the external syncpoint coordinator (for example, TXSeries(R)) that it wants to start a transaction.
  2. The syncpoint coordinator tells known resource managers, such as WebSphere MQ, about the current transaction.
  3. The application issues calls to resource managers associated with the current transaction. For example, the application could issue MQGET calls to WebSphere MQ.
  4. The application issues a commit or backout request to the external syncpoint coordinator.
  5. The syncpoint coordinator completes the transaction by issuing the appropriate calls to each resource manager, typically using two-phase commit protocols.

The supported levels of external syncpoint coordinators that can provide a two-phase commit process for transactions in which WebSphere MQ participates are defined at:

http://www.ibm.com/software/ts/mqseries/platforms/supported.html

See the WebSphere MQ Application Programming Guide for information about writing and building transactions to be coordinated by an external syncpoint coordinator.

The rest of this chapter describes how to enable external units of work.

The WebSphere MQ XA switch structure

Each resource manager participating in an externally coordinated unit of work must provide an XA switch structure. This structure defines both the capabilities of the resource manager and the functions that are to be called by the syncpoint coordinator.

WebSphere MQ provides two versions of this structure:

Consult your transaction manager documentation to determine whether to use the static or dynamic resource management interface. Wherever a transaction manager supports it, we recommend that you use dynamic XA resource management.

The following table details the XA switch load file names depending on platform:

Table 15. XA switch load file names
Platform
Switch load file name
(server)
Switch load file name
(extended transactional client)
Windows mqmxa.dll mqcxa.dll
AIX (nonthreaded) libmqmxa.a libmqcxa.a
AIX (threaded) libmqmxa_r.a libmqcxa_r.a
HP-UX (nonthreaded) libmqmxa.sl libmqcxa.sl
HP-UX (threaded) libmqmxa_r.sl libmqcxa_r.sl
Linux (nonthreaded) libmqmxa.so libmqcxa.so
Linux (thread) libmqmxa_r.so libmqcxa_r.so
Solaris libmqmxa.so libmqcxa.so

Some external syncpoint coordinators (not CICS(R)) require that each resource manager participating in a unit of work supplies its name in the name field of the XA switch structure. The WebSphere MQ resource manager name is MQSeries_XA_RMI.

The syncpoint coordinator defines how the WebSphere MQ XA switch structure links to it. Information about linking the WebSphere MQ XA switch structure with CICS is provided in Using CICS. For information about linking the WebSphere MQ XA switch structure with other XA-compliant syncpoint coordinators, consult the documentation supplied with those products.

The following considerations apply to using WebSphere MQ with all XA-compliant syncpoint coordinators: