Platform SDK: Transaction Server

Obtaining a Transaction Dispenser from a Transaction

When the application client calls the RM_Enlist function, passing it the ITransaction interface to the transaction object, the RM proxy needs to know the transaction dispenser from which the transaction object was obtained. This is essential because there can be multiple transaction dispensers, and the transaction can be propagated only by the transaction coordinator which dispensed the transaction. To get to the appropriate transaction dispenser from a transaction:

  1. Invoke the ITransaction::QueryInterface method obtain the IGetDispenser interface.
  2. Invoke the IGetDispenser::GetDispenser method to obtain the ITransactionDispenser interface.
  3. Then invoke the ITransactionDispenser::QueryInterface to obtain the ITransactionExportFactory interface.