ISinglePhaseNotification.SinglePhaseCommit Method

Represents the resource manager's implementation of the callback for the single phase commit optimization.

Namespace:  System.Transactions
Assembly:  System.Transactions (in System.Transactions.dll)

void SinglePhaseCommit(
	SinglePhaseEnlistment singlePhaseEnlistment
)

Parameters

singlePhaseEnlistment
Type: System.Transactions.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.

Therefore, on this enlistment of the resource manager, either the SinglePhaseCommit method is called, or the two phase commit methods defined in ther 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.

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0, 2.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft