IEnlistmentNotification Interface
Describes an interface that a resource manager should implement to provide two phase commit notification callbacks for the transaction manager upon enlisting for participation.
Assembly: System.Transactions (in System.Transactions.dll)
The IEnlistmentNotification type exposes the following members.
| Name | Description | |
|---|---|---|
![]() | Commit | Notifies an enlisted object that a transaction is being committed. |
![]() | InDoubt | Notifies an enlisted object that the status of a transaction is in doubt. |
![]() | Prepare | Notifies an enlisted object that a transaction is being prepared for commitment. |
![]() | Rollback | Notifies an enlisted object that a transaction is being rolled back (aborted). |
In order for a resource manager to participate in a transaction, it must enlist in the transaction through the transaction manager. The Transaction class defines a set of methods whose names begin with Enlist that provide this functionality. The different Enlist methods correspond to the different types of enlistment that a resource maanger may have.
This class describes an interface that a resource manager should implement to provide two phase commit notification callbacks for the transaction manager upon enlisting for participation. For each resource manager's implementation of the IEnlistmentNotification interface, you should enlist it using the EnlistVolatile() method or the EnlistDurable() method of the Transaction class, depending on whether your resource is volatile or durable. For more information on enlistment and 2PC, see Enlisting Resources As Participants In A Transaction and Committing A Transaction In Single-Phase and Multi-Phase respectively.
The transaction manager notifies the enlisted object at different phases of the Two Phase Commit Protocol by the following methods.
Method | Description |
|---|---|
This method of an enlisted object is used as a callback by the Transaction Manager during the first phase of a transaction, when the transaction manager asks participants whether they can commit the transaction. | |
This method of an enlisted object is used as a callback by the Transaction Manager during the second phase of a transaction if the transaction is commited. | |
This method of an enlisted object is used as a callback by the Transaction Manager during the second phase of a transaction if the transaction is aborted (that is, rolled back). | |
This method of an enlisted object is used as a callback by the Transaction Manager during the second phase of a transaction if the transaction is in doubt. |
Note |
|---|
You should be aware that notifications might not be sent sequentially, or in a particular order. |
Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
