internal void PSPEInitialize(InternalTransaction tx, IPromotableSinglePhaseNotification promotableSinglePhaseNotification) { base.CommonEnterState(tx); try { promotableSinglePhaseNotification.Initialize(); } finally { TransactionState._TransactionStateActive.CommonEnterState(tx); } }
public bool EnlistPromotableSinglePhase( IPromotableSinglePhaseNotification notification) { EnsureIncompleteCurrentScope(); // The specs aren't entirely clear on whether we can have volatile RMs along with a PSPE, but // I'm assuming that yes based on: http://social.msdn.microsoft.com/Forums/br/windowstransactionsprogramming/thread/3df6d4d3-0d82-47c4-951a-cd31140950b3 if (pspe != null || Durables.Count > 0) { return(false); } pspe = notification; pspe.Initialize(); return(true); }
public bool EnlistPromotableSinglePhase ( IPromotableSinglePhaseNotification notification) { EnsureIncompleteCurrentScope (); // The specs aren't entirely clear on whether we can have volatile RMs along with a PSPE, but // I'm assuming that yes based on: http://social.msdn.microsoft.com/Forums/br/windowstransactionsprogramming/thread/3df6d4d3-0d82-47c4-951a-cd31140950b3 if (pspe != null || Durables.Count > 0) return false; pspe = notification; pspe.Initialize(); return true; }
// This method will call the intialize method on IPromotableSinglePhaseNotification. // The tx state will be set to TransactionStatePhase0 to receive and process further // enlistments during Phase0. internal void Phase0PSPEInitialize( InternalTransaction tx, IPromotableSinglePhaseNotification promotableSinglePhaseNotification, Guid promoterType) { Debug.Assert(tx.State == TransactionStatePhase0, "Phase0PSPEInitialize called from state other than TransactionStatePhase0"); CommonEnterState(tx); try { // Try to initialize the PSPE. If an exception is thrown let it propagate // all the way up to the caller. promotableSinglePhaseNotification.Initialize(); // Set the PromoterType for the transaction. tx._promoterType = promoterType; } finally { TransactionStatePhase0.CommonEnterState(tx); } }
internal void PSPEInitialize( InternalTransaction tx, IPromotableSinglePhaseNotification promotableSinglePhaseNotification ) { Debug.Assert( tx.State == _TransactionStateActive, "PSPEPromote called from state other than TransactionStateActive" ); CommonEnterState( tx ); try { // Try to initialize the pspn. If an exception is thrown let it propigate // all the way up to the caller. promotableSinglePhaseNotification.Initialize(); } finally { _TransactionStateActive.CommonEnterState( tx ); } }