Transaction.EnlistPromotableSinglePhase Méthode

Définition

Inscrit un gestionnaire de ressources qui a une transaction interne à l'aide d'une inscription à phase unique pouvant être promue (PSPE).

Surcharges

EnlistPromotableSinglePhase(IPromotableSinglePhaseNotification)

Inscrit un gestionnaire de ressources qui a une transaction interne à l'aide d'une inscription à phase unique pouvant être promue (PSPE).

EnlistPromotableSinglePhase(IPromotableSinglePhaseNotification, Guid)

Inscrit un gestionnaire de ressources qui a une transaction interne à l'aide d'une inscription à phase unique pouvant être promue (PSPE).

EnlistPromotableSinglePhase(IPromotableSinglePhaseNotification)

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

Inscrit un gestionnaire de ressources qui a une transaction interne à l'aide d'une inscription à phase unique pouvant être promue (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

Paramètres

promotableSinglePhaseNotification
IPromotableSinglePhaseNotification

Interface IPromotableSinglePhaseNotification implémentée par le participant.

Retours

Implémentation de l'interface SinglePhaseEnlistment qui décrit l'inscription.

Remarques

Les inscriptions dans une transaction sont volatiles ; autrement dit, ils ne survivent pas à l’échec du participant. En outre, cette méthode suggère uniquement au gestionnaire de transactions d’escalader le contrôle, mais l’escalade elle-même n’est pas garantie. Si l’escalade échoue, l’utilisateur n’est pas averti et la transaction est annulée.

Le paramètre promotableSinglePhaseNotification est utilisé pour communiquer au gestionnaire de transactions le résultat de la tentative de validation de la transaction interne du gestionnaire de ressources. Si des données incohérentes sont signalées, le gestionnaire de transactions lève une exception. Si un InDoubt résultat est signalé, le gestionnaire de transactions recherche la notification de résultat dans son propre enrôlement interne et ignore la réponse signalée.

Pour plus d’informations sur les inscriptions et l’escalade d’une transaction, consultez Escalade de la gestion des transactions. Pour plus d’informations sur PSPE, consultez Optimisation à l’aide d’une validation monophase et notification de phase unique promotable.

S’applique à

EnlistPromotableSinglePhase(IPromotableSinglePhaseNotification, Guid)

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

Inscrit un gestionnaire de ressources qui a une transaction interne à l'aide d'une inscription à phase unique pouvant être promue (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

Paramètres

promotableSinglePhaseNotification
IPromotableSinglePhaseNotification

Interface IPromotableSinglePhaseNotification implémentée par le participant.

promoterType
Guid

Type du processeur de transaction distribuée.

Retours

Implémentation de l'interface SinglePhaseEnlistment qui décrit l'inscription.

Remarques

Si la valeur spécifiée pour le promoterType paramètre est TransactionInterop.PromoterTypeDtc, la transaction doit être promue par MSDTC et le byte[] retourné par la IPromotableSinglePhaseNotification.Promote méthode doit être un jeton de propagation de transaction MSDTC.

Si la valeur spécifiée pour le promoterType paramètre n’est pasTransactionInterop.PromoterTypeDTC, la transaction ne sera pas promue par MSDTC, mais plutôt par l’implémentation de l’appelant de IPromotableSinglePhaseNotification. Si cet appel réussit, il existe un ensemble d’opérations suivantes sur la transaction qui retourne un TransactionPromotionException. Ces opérations sont les suivantes :

  • Transaction.EnlistDurable

  • TransactionInterop.GetDtcTransaction

  • TransactionInterop.GetExportCookie

  • TransactionInterop.GetTransmitterPropagationToken

  • Sérialisation d’un objet Transaction

S’applique à