Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

Transaction.EnlistVolatile Method (ISinglePhaseNotification, EnlistmentOptions)

Enlists a volatile resource manager that supports single phase commit optimization to participate in a transaction.

Namespace:  System.Transactions
Assembly:  System.Transactions (in System.Transactions.dll)
public Enlistment EnlistVolatile(
	ISinglePhaseNotification singlePhaseNotification,
	EnlistmentOptions enlistmentOptions
)

Parameters

singlePhaseNotification
Type: System.Transactions.ISinglePhaseNotification

An object that implements the ISinglePhaseNotification interface that must be able to receive single phase commit and two phase commit notifications.

enlistmentOptions
Type: System.Transactions.EnlistmentOptions

EnlistDuringPrepareRequired if the resource manager wants to perform additional work during the prepare phase.

Return Value

Type: System.Transactions.Enlistment
An Enlistment object that describes the enlistment.

Volatile resource managers cannot recovery from failure to complete a transaction in which they were participating. To obtain a durable enlistment in a transaction, use the EnlistDurable method. For more information on volatile and durable resources, as well as how to enlist a resource, see Implementing A Resource Manager. For more information on how a resource manager responds to commit notification and prepare the commit, see Committing A Transaction In Single-Phase and Multi-Phase.

You should note that even when your resource manager implementation enlists with this method, it is not guaranteed that it receives a single phase commit. The transaction manager can still send two phase commit notifications instead. For more information on the single phase commit optimization, see Optimization Using Single Phase Commit and Promotable Single Phase Notification.

.NET Framework

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

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows Phone 8.1, Windows Phone 8, 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.

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.