语言

IPromotableSinglePhaseNotification.SinglePhaseCommit 方法

定义

通知登记的对象正在提交事务。

public:
 void SinglePhaseCommit(System::Transactions::SinglePhaseEnlistment ^ singlePhaseEnlistment);
public void SinglePhaseCommit(System.Transactions.SinglePhaseEnlistment singlePhaseEnlistment);
abstract member SinglePhaseCommit : System.Transactions.SinglePhaseEnlistment -> unit
Public Sub SinglePhaseCommit (singlePhaseEnlistment As SinglePhaseEnlistment)

参数

singlePhaseEnlistment
SinglePhaseEnlistment

SinglePhaseEnlistment用于向事务管理器发送响应的接口。

注解

此方法通知登记的对象要提交事务。

这些 singlePhaseEnlistment 参数包含回调,允许此接口的实现通知事务管理器事务的结果,因为事务管理器已委托对事务的控制。 对于提升的事务,事务管理器侦听事务结果并替代正在发送的响应。

收到此通知时,资源管理器应尝试提交其内部事务(或已升级的分布式事务),并根据提交事务的结果对参数调用其中一个回调方法 singlePhaseEnlistment 。

适用于