SourcePro DB : DB XA Module User’s Guide : Overview : The DB XA Module in the X/Open DTP Environment
The DB XA Module in the X/Open DTP Environment
The DB XA Module can be understood as providing a bridge between applications developed with SourcePro DB and the resource manager, through the TPM. In the X/Open DTP environment, the roles of the various components are clearly defined. The transaction monitor registers which resource managers are available and involved in transactions; the resource manager provides data storage; and the DB XA Module encapsulates the XA connection. This encapsulation makes the connection available to SourcePro DB, which can then be used to build and execute SQL statements against the resource manager.
The DB XA Module provides classes that give the application program access to XA connections. Traditionally, SourcePro DB provided access to resource managers though the RWDBConnection class. In this traditional model RWDBDatabase produced RWDBConnection objects.
The DB XA Module maintains the producer/product paradigm, while providing XA-compliant functionality. To this end, the DB XA Module gives you the database() method from RWDBManager and allows you to pass an XA key through its propertyString parameter. Using the XA key, RWDBManager::database() produces XA-enabled RWDBDatabase objects, which can, in turn, produce XA-enabled RWDBConnection objects.
The DB XA Module includes a set of XA-specific access modules to provide database implementations that derive from the traditional access module database implementations. For example, the XA-enabled Oracle OCI Access Module provides class RWDBOCIXADatabaseImp, which re-implements the connection() method to produce XA-specific RWDBConnection objects.