Previous Topic: X/Open Distributed Transaction ProcessingNext Topic: Applications with Transaction Control: Non-XA Tuxedo Servers


Two Phase Commit Process

The service that begins a global transaction is the service that commits or aborts the transaction. The TMS chosen to coordinate the commit is one from the server group that is first visited by the global transaction. As service calls proceed, a transaction participant tree is built of all servers involved in the transaction.

Phase 1

Prepare-The first phase of a two phase commit occurs when the coordinating TMS issues a prepare request. This is issued to all TMS servers, of all groups associated with the transaction participant tree for the global transaction. The request results in xa_prepare(XID) calls made by TMS servers to each associated RM. Phase 2 cannot begin until all RMs issue a successful acknowledgement. The results of the prepare requests are logged in the Tuxedo TLOG.

Phase 2

Commit-The second phase of a two phase commit occurs when the coordinating TMS issues a commit request to all participating TMS servers. This results in xa_commit(XID) calls made by TMS servers to their associated RMs. The results of the commit requests are logged in the Tuxedo TLOG.

If any failure acknowledgements are encountered during the commit phase, this constitutes a Heuristic Hazard, indicating that one or more RMs may be out of synchronization. When this happens, operator intervention is needed to explicitly commit or rollback the transaction.