Breyta

Deila með


Transaction.EnlistPromotableSinglePhase Method

Definition

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

Overloads

EnlistPromotableSinglePhase(IPromotableSinglePhaseNotification)

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

EnlistPromotableSinglePhase(IPromotableSinglePhaseNotification, Guid)

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

EnlistPromotableSinglePhase(IPromotableSinglePhaseNotification)

Source:
Transaction.cs
Source:
Transaction.cs
Source:
Transaction.cs

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

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

Parameters

promotableSinglePhaseNotification
IPromotableSinglePhaseNotification

A IPromotableSinglePhaseNotification interface implemented by the participant.

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.

Applies to

EnlistPromotableSinglePhase(IPromotableSinglePhaseNotification, Guid)

Source:
Transaction.cs
Source:
Transaction.cs
Source:
Transaction.cs

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

promotableSinglePhaseNotification
IPromotableSinglePhaseNotification

A IPromotableSinglePhaseNotification interface implemented by the participant.

promoterType
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 not TransactionInterop.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

  • TransactionInterop.GetTransmitterPropagationToken

  • Serialization of a Transaction object

Applies to