コード例 #1
0
        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);
        }
コード例 #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;
            }
        }
コード例 #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)");
            }
        }
コード例 #4
0
        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;
            }
        }
コード例 #5
0
 public AutoTransaction(
     TisTransactionManager transactionManager,
     Mode enMode)
 {
     Init(transactionManager, enMode);
 }
コード例 #6
0
 public AutoTransaction(TisTransactionManager transactionManager)
 {
     Init(transactionManager, Mode.CAN_USE_CURRENT);
 }