The present invention extends to methods, systems, and computer program
products for synchronizing ambient state among multiple transaction
managers. A coordinating transaction manager establishes transaction
ambient state for an application initiated transaction. The coordinating
transaction manager sends and a subordinate transaction manager receives
a pointer to an ambient state delegate. The subordinate transaction
manager sends a request to invoke the ambient state delegate to the
coordinating transaction manager in response to receiving an operation.
The coordinating transaction manager invokes the ambient state delegate
to format the transaction ambient state for the subordinate transaction
manager. The coordinating transaction manager sends and the subordinate
transaction manager receives the formatted transaction ambient state such
that the subordinate transaction manager can appropriately process the
operation within the scope of the transaction. The subordinate
transaction manager utilizes the formatted transaction ambient state to
appropriately process the operation within the scope of the transaction.