9.1 What Is a Global Transaction?
A global transaction is a mechanism that allows a set of programming tasks, potentially using more than one resource manager and potentially executing on multiple servers, to be treated as one logical unit.
Once a process is in transaction mode, any service requests made to servers may be processed on behalf of the current transaction. The services that are called and join the transaction are referred to as transaction participants. The value returned by a participant may affect the outcome of the transaction.
A global transaction may be composed of several local transactions, each accessing the same resource manager. The resource manager is responsible for performing concurrency control and atomicity of updates. A given local transaction may be either successful or unsuccessful in completing its access; it cannot be partially successful.
A maximum of 16 server groups can participate in a single transaction.
The Oracle Tuxedo system manages a global transaction in conjunction with the participating resource managers and treats it as a specific sequence of operations that is characterized by atomicity, consistency, isolation, and durability. In other words, a global transaction is a logical unit of work in which:
- All portions either succeed or have no effect.
- Operations are performed that correctly transform resources from one consistent state to another.
- Intermediate results are not accessible to other transactions, although some processes in a transaction may access the data associated with another process.
- Once a sequence is complete, its results cannot be altered by any kind of failure.
The Oracle Tuxedo system tracks the status of each global transaction and determines whether it must be committed or rolled back.
Note:
If a transaction includes calls to tpcall(),tpacall()
, or tpconnect() for which the flags
parameter is explicitly set to TPNOTRAN
, the operations performed by the called service do not become part of that transaction. In this case, the calling process does not invite the called service to be a participant in the current transaction. As a result, services performed by the called process are not affected by the outcome of the current transaction. If TPNOTRAN
is set for a call that is directed to a service in an XA-compliant server group, the call may be executed outside of transaction mode or in a separate transaction, depending on how the service is configured and coded. For more information, refer to Implicitly Defining a Global Transaction.
Parent topic: Writing Global Transactions