IPromotableSinglePhaseNotification.SinglePhaseCommit(SinglePhaseEnlistment) 方法
定义
通知登记的对象事务正在提交。Notifies an enlisted object that the transaction is being committed.
public:
void SinglePhaseCommit(System::Transactions::SinglePhaseEnlistment ^ singlePhaseEnlistment);
public:
void SinglePhaseCommit(System::Transactions::SinglePhaseEnlistment ^ enlistment);
public void SinglePhaseCommit (System.Transactions.SinglePhaseEnlistment singlePhaseEnlistment);
public void SinglePhaseCommit (System.Transactions.SinglePhaseEnlistment enlistment);
abstract member SinglePhaseCommit : System.Transactions.SinglePhaseEnlistment -> unit
abstract member SinglePhaseCommit : System.Transactions.SinglePhaseEnlistment -> unit
Public Sub SinglePhaseCommit (singlePhaseEnlistment As SinglePhaseEnlistment)
Public Sub SinglePhaseCommit (enlistment As SinglePhaseEnlistment)
参数
- singlePhaseEnlistmentenlistment
- SinglePhaseEnlistment
用于将响应发送到事务管理器的 SinglePhaseEnlistment 接口。A SinglePhaseEnlistment interface used to send a response to the transaction manager.
注解
此方法通知登记的对象事务将被提交。This method notifies an enlisted object that the transaction is to be committed.
singlePhaseEnlistment参数包含允许此接口的实现通知事务管理器事务结果的回调,因为事务管理器已委托对事务的控制。The singlePhaseEnlistment parameters contain callbacks that allow the implementation of this interface to notify the transaction manager of the outcome of the transaction, since the transaction manager has delegated control of the transaction. 对于已升级的事务,事务管理器会侦听事务结果,并替代正在发送的响应。In the case of a promoted transaction, the transaction manager listens to the transaction outcome and overrides the response being sent.
收到此通知后,资源管理器应尝试提交它的内部事务 (或分布式事务,前提是该事务已) 升级,并根据 singlePhaseEnlistment 提交它的事务的结果对该参数调用其中一个回调方法。On receiving this notification, the resource manager should attempt to commit it's internal transaction (or the distributed transaction if it has been escalated), and invoke one of the callback methods on the singlePhaseEnlistment parameter based on the outcome of committing it's transaction.