Beispiel #1
0
        void System.Transactions.IEnlistmentNotification.Prepare(System.Transactions.PreparingEnlistment preparingEnlistment)
        {
            if (this.aborted)
            {
                preparingEnlistment.ForceRollback();

                this.Rollback();
                this.Release();

                preparingEnlistment.Done();
            }
            else
            {
                preparingEnlistment.Prepared();
            }
        }
Beispiel #2
0
        void System.Transactions.IEnlistmentNotification.Rollback(System.Transactions.Enlistment enlistment)
        {
            ////bool timeout = Transaction.current != this;

            // Rollback can be concurrent (timeout)
            this.EnterAtomicSection();

            this.aborted = true;
            this.Rollback();
            this.Release();

            this.ExitAtomicSection();

            enlistment.Done();
        }
Beispiel #3
0
        void System.Transactions.IEnlistmentNotification.Commit(System.Transactions.Enlistment enlistment)
        {
            this.Commit();
            this.Release();

            enlistment.Done();
        }