Transaction.EnlistPromotableSinglePhase 方法

定義

使用可提升單一階段登記 (PSPE) 來登記具有內部交易的資源管理員。

多載

EnlistPromotableSinglePhase(IPromotableSinglePhaseNotification)

使用可提升單一階段登記 (PSPE) 來登記具有內部交易的資源管理員。

EnlistPromotableSinglePhase(IPromotableSinglePhaseNotification, Guid)

使用可提升單一階段登記 (PSPE) 來登記具有內部交易的資源管理員。

EnlistPromotableSinglePhase(IPromotableSinglePhaseNotification)

來源:
Transaction.cs
來源:
Transaction.cs
來源:
Transaction.cs

使用可提升單一階段登記 (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

參數

promotableSinglePhaseNotification
IPromotableSinglePhaseNotification

參與者所實作的 IPromotableSinglePhaseNotification 介面。

傳回

SinglePhaseEnlistment 介面實作,可描述此登記。

備註

交易中的登記是變動性的;也就是說,他們不會在參與者失敗後存留。 此外,這個方法只會建議交易管理員呈報控制權,但不保證擴大本身。 如果呈報失敗,則不會通知使用者,且交易會回復。

參數 promotableSinglePhaseNotification 是用來與交易管理員通訊嘗試認可資源管理員內部交易的結果。 如果報告了不一致的數據,交易管理員會擲回例外狀況。 InDoubt如果回報結果,交易管理員會在自己的內部登記中尋找結果通知,並忽略回報的回應。

如需登記和擴大交易的詳細資訊,請參閱 交易管理擴大。 如需 PSPE 的詳細資訊,請參閱 使用單一階段認可優化和可提升單一階段通知

適用於

EnlistPromotableSinglePhase(IPromotableSinglePhaseNotification, Guid)

來源:
Transaction.cs
來源:
Transaction.cs
來源:
Transaction.cs

使用可提升單一階段登記 (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

參數

promotableSinglePhaseNotification
IPromotableSinglePhaseNotification

參與者所實作的 IPromotableSinglePhaseNotification 介面。

promoterType
Guid

分散式交易處理器的類型。

傳回

SinglePhaseEnlistment 介面實作,可描述此登記。

備註

如果為 promoterType 參數 TransactionInterop.PromoterTypeDtc指定的值為 ,則交易 必須由 MSDTC 升級, byte[] 而且從方法傳回的 IPromotableSinglePhaseNotification.Promote必須是 MSDTC 交易傳播令牌。

如果為 promoterType 參數指定的值 不是TransactionInterop.PromoterTypeDTC ,則交易將不會由 MSDTC 升級,而是由呼叫端的 IPromotableSinglePhaseNotification實作來升級。 如果此呼叫成功,則交易上有一組後續作業會傳回 TransactionPromotionException。 這些工作包括:

  • Transaction.EnlistDurable

  • TransactionInterop.GetDtcTransaction

  • TransactionInterop.GetExportCookie

  • TransactionInterop.GetTransmitterPropagationToken

  • Transaction 物件的串行化

適用於