Transaction.EnlistPromotableSinglePhase Transaction.EnlistPromotableSinglePhase Transaction.EnlistPromotableSinglePhase Transaction.EnlistPromotableSinglePhase Method

Definition

Enlists a resource manager that has an internal transaction using a promotable single phase enlistment (PSPE).

Overloads

EnlistPromotableSinglePhase(IPromotableSinglePhaseNotification, Guid) EnlistPromotableSinglePhase(IPromotableSinglePhaseNotification, Guid) EnlistPromotableSinglePhase(IPromotableSinglePhaseNotification, Guid) EnlistPromotableSinglePhase(IPromotableSinglePhaseNotification, Guid)

Enlists a resource manager that has an internal transaction using a promotable single phase enlistment (PSPE).

EnlistPromotableSinglePhase(IPromotableSinglePhaseNotification) EnlistPromotableSinglePhase(IPromotableSinglePhaseNotification) EnlistPromotableSinglePhase(IPromotableSinglePhaseNotification) EnlistPromotableSinglePhase(IPromotableSinglePhaseNotification)

Enlists a resource manager that has an internal transaction using a promotable single phase enlistment (PSPE).

EnlistPromotableSinglePhase(IPromotableSinglePhaseNotification, Guid) EnlistPromotableSinglePhase(IPromotableSinglePhaseNotification, Guid) EnlistPromotableSinglePhase(IPromotableSinglePhaseNotification, Guid) EnlistPromotableSinglePhase(IPromotableSinglePhaseNotification, Guid)

Enlists a resource manager that has an internal transaction using a promotable single phase enlistment (PSPE).

public:
 bool EnlistPromotableSinglePhase(System::Transactions::IPromotableSinglePhaseNotification ^ promotableSinglePhaseNotification, Guid promoterType);
public bool EnlistPromotableSinglePhase (System.Transactions.IPromotableSinglePhaseNotification promotableSinglePhaseNotification, Guid promoterType);
member this.EnlistPromotableSinglePhase : System.Transactions.IPromotableSinglePhaseNotification * Guid -> bool
Public Function EnlistPromotableSinglePhase (promotableSinglePhaseNotification As IPromotableSinglePhaseNotification, promoterType As Guid) As Boolean
Parameters
promoterType
Guid Guid Guid Guid

The type of the distributed transaction processor.

Returns

A SinglePhaseEnlistment interface implementation that describes the enlistment.

Remarks

If the value specified for the promoterType parameter is TransactionInterop.PromoterTypeDtc, the transaction must be promoted by MSDTC and the byte[] returned from the IPromotableSinglePhaseNotification.Promote method must be an MSDTC transaction propagation token.

If the value specified for the promoterType parameter is notTransactionInterop.PromoterTypeDTC, the transaction will not be promoted by MSDTC, but rather by the caller’s implementation of IPromotableSinglePhaseNotification. If this call is successful, there is a set of subsequent operations on the transaction that will return a TransactionPromotionException. These operations are:

  • Transaction.EnlistDurable

  • TransactionInterop.GetDtcTransaction

  • TransactionInterop.GetExportCookie

  • TransctionInterop.GetTransmitterPropagationToken

  • Serialization of a Transaction object

EnlistPromotableSinglePhase(IPromotableSinglePhaseNotification) EnlistPromotableSinglePhase(IPromotableSinglePhaseNotification) EnlistPromotableSinglePhase(IPromotableSinglePhaseNotification) EnlistPromotableSinglePhase(IPromotableSinglePhaseNotification)

Enlists a resource manager that has an internal transaction using a promotable single phase enlistment (PSPE).

public:
 bool EnlistPromotableSinglePhase(System::Transactions::IPromotableSinglePhaseNotification ^ notification);
public bool EnlistPromotableSinglePhase (System.Transactions.IPromotableSinglePhaseNotification notification);
member this.EnlistPromotableSinglePhase : System.Transactions.IPromotableSinglePhaseNotification -> bool
Public Function EnlistPromotableSinglePhase (notification As IPromotableSinglePhaseNotification) As Boolean
Parameters
Returns

A SinglePhaseEnlistment interface implementation that describes the enlistment.

Remarks

Enlistments in a transaction are volatile; that is, they do not survive the failure of the participant. In addition, this method only suggests the transaction manager to escalate control, but the escalation itself is not guaranteed. If escalation fails, the user is not notified and the transaction is rolled back.

The parameter promotableSinglePhaseNotification is used to communicate to the transaction manager the outcome of attempting to commit the resource manager's internal transaction. If inconsistent data is reported, the transaction manager throws an exception. If an InDoubt outcome is reported, the transaction manager looks for the outcome notification in its own internal enlistment and ignores the reported response.

For more information on enlistments and escalation of a transaction, please see Transaction Management Escalation. For more information on PSPE, see Optimization Using Single Phase Commit and Promotable Single Phase Notification.

Note This method uses LinkDemand to prevent it from being called from untrusted code; however, only the immediate caller is required to possess the FullTrust permission set.

Applies to