/** * Method declaration * * * @param rollback * * @throws Exception */ public void endNestedTransaction(bool rollback) { Trace.assert(bNestedTransaction, "endNestedTransaction"); int i = tTransaction.Count - 1; if (rollback) { while (i >= iNestedOldTransIndex) { Transaction t = (Transaction)tTransaction[i]; t.rollback(); i--; } } bNestedTransaction = false; bAutoCommit = bNestedOldAutoCommit; if (bAutoCommit == true) { tTransaction.RemoveRange(iNestedOldTransIndex, (tTransaction.Count - iNestedOldTransIndex)); } }
/** * Method declaration * * * @throws Exception */ public void rollback() { int i = tTransaction.Count - 1; while (i >= 0) { Transaction t = (Transaction)tTransaction[i]; t.rollback(); i--; } tTransaction.Clear(); }