Transaction.PromoteAndEnlistDurable(Guid, IPromotableSinglePhaseNotification, ISinglePhaseNotification, EnlistmentOptions) 方法

定义

提升和登记支持两阶段提交的持久资源管理器以参与事务。Promotes and enlists a durable resource manager that supports two phase commit to participate in a transaction.

public:
 System::Transactions::Enlistment ^ PromoteAndEnlistDurable(Guid manager, System::Transactions::IPromotableSinglePhaseNotification ^ promotableNotification, System::Transactions::ISinglePhaseNotification ^ notification, System::Transactions::EnlistmentOptions options);
public System.Transactions.Enlistment PromoteAndEnlistDurable (Guid manager, System.Transactions.IPromotableSinglePhaseNotification promotableNotification, System.Transactions.ISinglePhaseNotification notification, System.Transactions.EnlistmentOptions options);
member this.PromoteAndEnlistDurable : Guid * System.Transactions.IPromotableSinglePhaseNotification * System.Transactions.ISinglePhaseNotification * System.Transactions.EnlistmentOptions -> System.Transactions.Enlistment
Public Function PromoteAndEnlistDurable (manager As Guid, promotableNotification As IPromotableSinglePhaseNotification, notification As ISinglePhaseNotification, options As EnlistmentOptions) As Enlistment

参数

resourceManagerIdentifier
Guid

资源管理器的唯一标识符,它应该在资源管理器失败或重新启动的过程中持久保留。A unique identifier for a resource manager, which should persist across resource manager failure or reboot.

promotableNotification
IPromotableSinglePhaseNotification

一个用作资源管理器内部非分布式事务的提交委托的对象。An object that acts as a commit delegate for a non-distributed transaction internal to a resource manager.

enlistmentNotification
ISinglePhaseNotification

实现 IEnlistmentNotification 接口以接收两阶段提交通知的对象。An object that implements the IEnlistmentNotification interface to receive two phase commit notifications.

enlistmentOptions
EnlistmentOptions

如果资源管理器在准备阶段想要执行额外工作,则为 EnlistDuringPrepareRequiredEnlistDuringPrepareRequired if the resource manager wants to perform additional work during the prepare phase.

返回

适用于