Export (0) Print
Expand All

Transaction.EnlistPromotableSinglePhase Method

Enlists a resource manager that has an internal transaction using a promotable single phase enlistment (PSPE).

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

[PermissionSetAttribute(SecurityAction.LinkDemand, Name = "FullTrust")]
public bool EnlistPromotableSinglePhase(
	IPromotableSinglePhaseNotification promotableSinglePhaseNotification
)

Parameters

promotableSinglePhaseNotification
Type: System.Transactions.IPromotableSinglePhaseNotification
A IPromotableSinglePhaseNotification interface implemented by the participant.

Return Value

Type: System.Boolean
A SinglePhaseEnlistment interface implementation that describes the enlistment.

Enlistments in a transaction are volatile; that is, they do not survive the failure of the participant. In addition, this method only suggests the transaction manager to escalate control, but the escalation itself is not guaranteed. If escalation fails, the user is not notified and the transaction is rolled back.

The parameter promotableSinglePhaseNotification is used to communicate to the transaction manager the outcome of attempting to commit the resource manager's internal transaction. If inconsistent data is reported, the transaction manager throws an exception. If an InDoubt outcome is reported, the transaction manager looks for the outcome notification in its own internal enlistment and ignores the reported response.

For more information on enlistments and escalation of a transaction, please see Transaction Management Escalation. For more information on PSPE, see Optimization Using Single Phase Commit and Promotable Single Phase Notification.

Note   This method uses LinkDemand to prevent it from being called from untrusted code; however, only the immediate caller is required to possess the FullTrust permission set.

.NET Framework

Supported in: 4, 3.5, 3.0, 2.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

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.

Community Additions

ADD
Show:
© 2014 Microsoft