Participating in the Two-Phase Commit Protocol

After a resource manager enlists in a transaction, it needs to participate in the two-phase commit protocol. The following figure shows the relationship between the objects that participate in the two-phase commit.

A resource manager enlists in a transaction by calling the IResouceManager::Enlist method and passes an instance of the ITransactionResourceAsync interface. The transaction coordinator delivers the Prepare, Commit, and Abort notifications to the resource manager via this callback interface. The following state diagrams show the states of the enlistment object as it exists in the MS DTC proxy and the states of the resource manager from the perspective of the enlistment object in the MS DTC proxy.