Phase Notification. Single Phase Commit(SinglePhaseEnlistment) Method
Represents the resource manager's implementation of the callback for the single phase commit optimization.
public: void SinglePhaseCommit(System::Transactions::SinglePhaseEnlistment ^ enlistment);
public void SinglePhaseCommit (System.Transactions.SinglePhaseEnlistment enlistment);
abstract member SinglePhaseCommit : System.Transactions.SinglePhaseEnlistment -> unit
Public Sub SinglePhaseCommit (enlistment As SinglePhaseEnlistment)
A SinglePhaseEnlistment used to send a response to the transaction manager.
It is the transaction manager's choice as to whether two phase commit or the single phase commit optimization is used with this resource manager. For more information on single phase and two phase commit, see Committing A Transaction In Single-Phase and Multi-Phase.
Your implementation of this method should call either the Committed method or the Aborted method of the
singlePhaseEnlistment parameter to indicate whether the transaction should be committed or rolled back.
The transaction manager calls this method when there is only one volatile enlistment that supports single phase commit, or when there are zero or more volatile enlistments and one durable enlistment. In the latter case, the volatile enlistments receive Prepare notifications for two-phase-commit, and the sole durable enlistment receives a single-phase commit notification.