Transaction.EnlistPromotableSinglePhase Metoda

Definice

Zařadí správce prostředků, který má interní transakci pomocí promotable single phase enlistment (PSPE).

Přetížení

EnlistPromotableSinglePhase(IPromotableSinglePhaseNotification)

Zařadí správce prostředků, který má interní transakci pomocí promotable single phase enlistment (PSPE).

EnlistPromotableSinglePhase(IPromotableSinglePhaseNotification, Guid)

Zařadí správce prostředků, který má interní transakci pomocí promotable single phase enlistment (PSPE).

EnlistPromotableSinglePhase(IPromotableSinglePhaseNotification)

Zdroj:
Transaction.cs
Zdroj:
Transaction.cs
Zdroj:
Transaction.cs

Zařadí správce prostředků, který má interní transakci pomocí 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

Parametry

promotableSinglePhaseNotification
IPromotableSinglePhaseNotification

Rozhraní IPromotableSinglePhaseNotification implementované účastníkem.

Návraty

Implementace SinglePhaseEnlistment rozhraní, která popisuje zařazení.

Poznámky

Zařazení v transakci jsou nestálé; to znamená, že nepřežijí selhání účastníka. Kromě toho tato metoda pouze navrhuje, aby správce transakcí eskalovat řízení, ale samotná eskalace není zaručena. Pokud eskalace selže, uživatel nebude upozorněn a transakce se vrátí zpět.

Parametr promotableSinglePhaseNotification se používá ke komunikaci se správcem transakcí o výsledek pokusu o potvrzení interní transakce správce prostředků. Pokud jsou hlášena nekonzistentní data, správce transakcí vyvolá výjimku. Pokud je hlášen výsledek InDoubt , správce transakcí vyhledá oznámení výsledku ve svém vlastním interním zařazení a ignoruje hlášenou odpověď.

Další informace o zařazení a eskalaci transakce najdete v tématu Eskalace správy transakcí. Další informace o PSPE najdete v tématu Optimalizace pomocí jednofázového potvrzení a Propagační jednofázové oznámení.

Platí pro

EnlistPromotableSinglePhase(IPromotableSinglePhaseNotification, Guid)

Zdroj:
Transaction.cs
Zdroj:
Transaction.cs
Zdroj:
Transaction.cs

Zařadí správce prostředků, který má interní transakci pomocí 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

Parametry

promotableSinglePhaseNotification
IPromotableSinglePhaseNotification

Rozhraní IPromotableSinglePhaseNotification implementované účastníkem.

promoterType
Guid

Typ procesoru distribuovaných transakcí.

Návraty

Implementace SinglePhaseEnlistment rozhraní, která popisuje zařazení.

Poznámky

Pokud je TransactionInterop.PromoterTypeDtchodnota zadaná pro promoterType parametr , transakce musí být zvýšena msdtc a byte[] vrácená z IPromotableSinglePhaseNotification.Promote metody musí být token šíření transakce MSDTC.

Pokud hodnota zadaná pro promoterType parametr neníTransactionInterop.PromoterTypeDTC, transakce nebude povýšena msdtc, ale spíše volající implementací IPromotableSinglePhaseNotification. Pokud je toto volání úspěšné, existuje sada následných operací transakce, které vrátí TransactionPromotionException. Jedná se o tyto operace:

  • Transaction.EnlistDurable

  • TransactionInterop.GetDtcTransaction

  • TransactionInterop.GetExportCookie

  • TransactionInterop.GetTransmitterPropagationToken

  • Serializace objektu Transaction

Platí pro