ISinglePhaseNotification.SinglePhaseCommit(SinglePhaseEnlistment) 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
表示单个阶段提交优化回调的资源管理器实现。
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用于将响应发送到事务管理器。
注解
事务管理器选择是两个阶段提交还是单阶段提交优化用于此资源管理器。
因此,在资源管理器的此登记中, SinglePhaseCommit 将调用该方法,或调用接口中 IEnlistmentNotification 定义的两个阶段提交方法。
此方法的实现应调用 Committed 方法或 Aborted 参数的方法 singlePhaseEnlistment ,以指示事务是应提交还是回滚。
事务管理器调用此方法时,只有一个可变登记支持单阶段提交,或者存在零个或多个可变登记和一个持久登记。 在后一种情况下,可变登记接收 Prepare 两阶段提交通知,唯一持久登记接收单阶段提交通知。