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); }
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; } }
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; } }
public AutoTransaction( TisTransactionManager transactionManager, Mode enMode) { Init(transactionManager, enMode); }
public AutoTransaction(TisTransactionManager transactionManager) { Init(transactionManager, Mode.CAN_USE_CURRENT); }