Share via


One-Pipe Resource Manager Enlistment

 

Applies To: Windows 10, Windows 7, Windows 8, Windows 8.1, Windows Server 2008, Windows Server 2008 R2, Windows Server 2012, Windows Server 2012 R2, Windows Server Technical Preview, Windows Vista

  1. The ODBC driver invokes IDtcToXaHelperSinglePipe::ConvertTridToXid to convert the OLE Transactions identifier (TRID) to an XA transaction identifier (XID). It passes in the ITransaction pointer, the RMCookie, and a pointer to a pre-allocated XID structure.

  2. The DTC proxy generates an XID and returns it in the XID structure.

  3. The ODBC driver constructs an xa_start_entry message containing the XID and sends it to the resource manager.

  4. The resource manager associates the connection with the XID and then replies to the xa_start_entry message.

  5. The ODBC driver invokes IDtcToXaHelperSinglePipe::EnlistWithRM. It passes in the RMCookie, a pointer to the transaction object, and a pointer to its ITransactionResourceAsync interface, which includes callback methods that the transaction manager invokes to deliver phase one and phase-two notifications to the ODBC driver. The ODBC driver is responsible for implementing the ITransactionResourceAsync interface.

  6. The DTC proxy informs the transaction manager that the ODBC driver wants to enlist in the transaction.

  7. The transaction manager creates an internal enlistment object to record that the ODBC driver is participating in the transaction. It then returns to the DTC proxy.

  8. The DTC proxy creates an enlistment object and returns the ITransactionEnlistmentAsync interface pointer of the enlistment object to the ODBC driver. The ITransactionEnlistmentAsync interface contains the transaction manager–implemented methods that the ODBC driver invokes after successfully processing an asynchronous PrepareRequest, CommitRequest, or AbortRequest.

  9. The ODBC driver returns from the SQLSetConnectAttrcall, and the application is free to perform work using the enlisted resource manager connection.