A resource manager (RM) provides access to shared resources such as databases.
DB2 as a resource manager of a database resource can participate in a global transaction that is being coordinated by an XA-compliant TM. As required by the XA interface, the database manager provides a db2xa_switch external C variable of type xa_switch_t to return the XA switch structure to the TM. This data structure contains the addresses of the various XA routines to be invoked by the TM, and the operating characteristics of the RM. For more information on the XA functions supported by the database manager see "XA Function Supported".
There are two methods for the RM to register its participation in each global transaction: static registration and dynamic registration. The database manager implements the more advanced and efficient dynamic registration method:
The XA interface provides two-way communication between a TM and an RM. It is a system-level interface between the two DTP software components, not an ordinary application program interface to which an application developer codes. However, application developers should be familiar with the programming function and restrictions that the DTP software components impose. See the Embedded SQL Programming Guide for information about the X/Open XA interface programming considerations.
Although the XA interface is invariant, each XA-compliant TM may have product specific ways of integrating an RM. For information about integrating your DB2 product as a resource manager with a specific transaction manager, see the appropriate TM product documentation.
[ DB2 List of Books | Search the DB2 Books ]