j1 |
The client invokes the ITransaction::Commit method in the MS DTC proxy. |
j2 |
The MS DTC proxy communicates with the client’s transaction manager. |
j3.1 |
The client’s transaction manager initiates phase one of the two-phase commit process. All of the work of preparing the transaction is done in parallel. The client’s transaction manager determines if any resource managers on the client’s system have enlisted in the transaction. If so, the client’s transaction manager asks each of these resource managers to prepare. In our example, no resource managers on the client’s system participated in the transaction. |
j3.2 |
The client’s transaction manager determines which subordinate transaction managers have participated in the transaction and sends each of them a Prepare message. These Prepare messages are sent to the subordinate transaction managers in parallel. |
j4.1 |
The resource manager’s transaction manager determines whether any transaction managers are subordinate to it. In our example, the resource manager’s transaction manager has no subordinates. If the resource manager’s transaction manager has subordinates, it sends each of them a Prepare message. These Prepare messages are sent to the subordinate transaction managers in parallel. |
j4.2 |
The resource manager’s transaction manager uses its internal enlistment objects to determine which resource managers have enlisted in the transactions. It sends a Prepare message to the MS DTC proxy of each enlisted resource manager. These Prepare messages are sent to the MS DTC Proxies in parallel. |
j4.3 |
The resource manager’s transaction manager awaits notification from all of the resource managers involved in the transaction that they have completed their prepare work. |
j5 |
Each MS DTC proxy invokes the resource manager's ITransactionResourceAsync::PrepareRequest method. This method invocation informs the resource manager that it should perform phase one of the two-phase commit protocol. |
j6 |
Each resource manager immediately responds to the PrepareRequest, thereby acknowledging that the PrepareRequest has been received. After responding to the PrepareRequest method invocation, the resource manager begins the work necessary to prepare the transaction. |