Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
public ref class TransactionInterop abstract sealed
public static class TransactionInterop
type TransactionInterop = class
Public Class TransactionInterop
This class provides methods for transaction propagation. For more information on how this process works, see Transaction Propagation.
Using the methods provided by this class, you can engage in two types of transaction propagations, Export/Import (push model) and Transmitter/Receiver (pull model).
The Export/Import (push model) propagation involves the following steps:
On the remote machine, obtain the "whereabouts" of the transaction manager of that machine by calling the GetWhereabouts method. You can then cache this piece of information on the client machine for future usage.
Send the data containing the whereabouts to the client machine using any preferred method.
On the client machine, use the whereabouts to "export" the transaction to the remote machine and generate a transaction "cookie". This is done by calling GetExportCookie and passing in the remote machine's whereabouts.
Send the data containing the transaction "cookie" to the remote machine using any preferred method.
On the remote machine, use the transaction "cookie" to obtain a clone of the client transaction by calling the GetTransactionFromExportCookie method.
The Transmitter/Receiver (pull model) propagation involves the following steps:
On the client machine, using the transaction generates a corresponding "propagation token" by calling GetTransmitterPropagationToken.
Send the data containing the "propagation token" of the transaction to the remote machine using any preferred method.
On the remote machine, use the "propagation token" to obtain a clone of the client transaction by calling <xref:System.Transactions.TransactionInterop.GetTransactionFromTransmitterPropagationToken%2A.
The Transmitter/Receiver model provides better performance in scenarios where the transaction token is sent to a remote machine, but the remote machine may not use it to obtain the transaction. This is because the transaction is not propagated until GetTransactionFromTransmitterPropagationToken is called. Another advantage is that the propagation token can be sent to any remote machine, while the export cookie can be used only on the machine that provided the whereabouts.
However, you should also note that the whereabouts of remote transaction managers are encapsulated in all the propagation tokens, making them bigger than the corresponding transaction cookies from the Export/Import model.
The type of the distributed transaction processor.
Transforms a transaction object into an export transaction cookie.
Generates a Transaction from the specified an export cookie.
Generates a Transaction instance from the specified transmitter propagation token.
Generates a propagation token for the specified Transaction.
Gets the Whereabouts of the distributed transaction manager that System.Transactions uses.