Download Informix Embedded SQL TP/XA Programmer`s Manual
Transcript
The Transaction Manager Managing Transactions In an X/Open DTP environment, a single transaction can span one or several RMs. The TM can manage both types of transactions, local (one RM) and global (several RMs). For a general description of local and global transactions, see page 1-7. Local Transactions A local transaction involves one service in a single RM. A local transaction can occur in one of the following ways: ■ Under the control of the TM The application program uses special transaction-management calls, provided as part of the AP-TM interface, to begin and commit the work in the local transaction. For more information, see “The AP-to-TM Interface” on page 1-24. ■ Under the control of the RM The application program uses the appropriate calls in the AP-RM, the native RM API, to start and end the local transaction. When this API is SQL, the application program starts the transaction with a BEGIN WORK statement and ends the transaction with a COMMIT WORK statement, or it uses single-statement transactions (implicit transactions). For more information, see “The AP-to-RM Interface” on page 1-23. Global Transactions In the X/Open DTP environment, many RMs can operate in support of the same global transaction. For example, an application program can require updates to several databases in several RMs in a single global transaction. The commitment of work in one transaction branch can be contingent on transaction branches that occur at other RMs. RMs are typically unaware of the work that other RMs perform. A global transaction includes more than one RM. 1-16 Informix Embedded SQL TP/XA Programmer’s Manual