ISinglePhaseNotification.SinglePhaseCommit(SinglePhaseEnlistment) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Represents the resource manager's implementation of the callback for the single phase commit optimization.
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)
Parameters
- singlePhaseEnlistment
- SinglePhaseEnlistment
A SinglePhaseEnlistment used to send a response to the transaction manager.
Remarks
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.
Therefore, on this enlistment of the resource manager, either the SinglePhaseCommit method is called, or the two phase commit methods defined in the IEnlistmentNotification interface are called.
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.
Applies to
反馈
https://aka.ms/ContentUserFeedback。
即将发布:在整个 2024 年,我们将逐步淘汰作为内容反馈机制的“GitHub 问题”,并将其取代为新的反馈系统。 有关详细信息,请参阅:提交和查看相关反馈