Life of a Transaction: Transaction Commit Phase 1–Prepare II (Phases)

j8.1 The resource manager invokes the ITransactionEnlistmentAsync::QueryInterface method on the enlistment object to obtain the IPrepareInfo interface.
j8.2 The resource manager invokes the IPrepareInfo::GetPrepareInfoSize method to determine the length of the prepare information. The prepare information is an opaque data item that identifies the transaction. The prepare information is used during failure recovery. At failure recovery time, the resource manager sends the prepare information to the transaction manager to learn the outcome of the transactions.
j9 The MS DTC proxy returns the byte length of the prepare information. The MS DTC proxy cached the prepare information when the resource manager enlisted in the transaction.
j10 The resource manager invokes the IPrepareInfo::GetPrepareInfo method to retrieve the prepare information.
j11 The MS DTC proxy returns the prepare information to the resource manager.
j12.1 The resource manager does the work necessary to prepare the transaction. This includes writing all changes made on behalf of the transaction to the resource manager’s log file. The resource manager then writes a Prepare record for the transaction to the log. The Prepare record must contain the prepare information obtained from MS DTC.
j12.2 The resource manager invokes the ITransactionEnlistmentAsync::PrepareRequestDone method to inform the MS DTC proxy that it has completed the prepare phase of the two-phase commit protocol.
j13 The MS DTC proxy informs the resource manager’s transaction manager that the resource manager has completed phase one.
j14 When all of the resource managers on the system complete phase one, the resource manager’s transaction manager writes a Prepared record to its log file. The resource manager’s transaction manager then informs the client’s transaction manager that phase one is complete.