private void InitTransactionManager(string sAppName)
        {
            m_oTransactionManager = new TisTransactionManager();

            m_oTransactionManager.OnExecuteTransaction  += new TransactionManagerEvent(OnCommitTransaction);
            m_oTransactionManager.OnRollbackTransaction += new TransactionManagerEvent(OnRollbackTransaction);

            m_oTransactionManager.AddTransactionMember(m_oApplicationResources);
        }
Ejemplo n.º 2
0
        public void Dispose()
        {
            if (m_oTransactionManager != null)
            {
                m_oTransactionManager.OnExecuteTransaction  -= new TransactionManagerEvent(OnCommitTransaction);
                m_oTransactionManager.OnRollbackTransaction -= new TransactionManagerEvent(OnRollbackTransaction);

                //  m_oTransactionManager.Dispose();
                m_oTransactionManager = null;
            }
        }
Ejemplo n.º 3
0
        private void Init(
            TisTransactionManager transactionManager,
            Mode enMode)
        {
            m_transactionManager = transactionManager;

            if (!m_transactionManager.InTransaction)
            {
                m_transactionManager.PrepareTransaction();

                m_inTransaction = true;
            }
            else
            if (enMode == Mode.NEW)
            {
                throw new TisException(
                          "Already in transaction (Mode.NEW specified)");
            }
        }
        public void Dispose()
        {
            if (OnDisposing != null)
            {
                OnDisposing(this, new EventArgs());
            }

            if (m_oInvokeTypesMngr != null)
            {
                m_oInvokeTypesMngr.Dispose();
                m_oInvokeTypesMngr = null;
            }

            if (m_oTransactionManager != null)
            {
                m_oTransactionManager.OnExecuteTransaction  -= new TransactionManagerEvent(OnCommitTransaction);
                m_oTransactionManager.OnRollbackTransaction -= new TransactionManagerEvent(OnRollbackTransaction);

                m_oTransactionManager = null;
            }
        }
Ejemplo n.º 5
0
 public AutoTransaction(
     TisTransactionManager transactionManager,
     Mode enMode)
 {
     Init(transactionManager, enMode);
 }
Ejemplo n.º 6
0
 public AutoTransaction(TisTransactionManager transactionManager)
 {
     Init(transactionManager, Mode.CAN_USE_CURRENT);
 }