Transaction.EnlistVolatile Method (IEnlistmentNotification, EnlistmentOptions)

 

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

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

member EnlistVolatile : 
        enlistmentNotification:IEnlistmentNotification *
        enlistmentOptions:EnlistmentOptions -> Enlistment

Parameters

enlistmentNotification
Type: System.Transactions.IEnlistmentNotification

An object that implements the IEnlistmentNotification interface to receive two-phase commit notifications.

enlistmentOptions
Type: System.Transactions.EnlistmentOptions

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.

Resource managers enlisted for participation in a transaction through this method receive two phase commit notifications that correspond to the methods defined on the IEnlistmentNotification interface.

The following example shows an implementation of IEnlistmentNotification interface, as well as enlisting the object as a participant in a transaction using the EnlistVolatile method.

No code example is currently available or this language may not be supported.

.NET Framework
Available since 2.0
Return to top
Show: