/** Begins a new read-only transaction. */ public void beginReadTxn() { assert (!isTxnInProgress()); if (manageReposSession) { repos.beginReposSession(); } repos.beginReposTxn(false); state = State.READ_TXN; }
/** Begins a new read/write transaction. */ public void beginWriteTxn() { assert (!isTxnInProgress()); if (readOnly) { throw FarragoResource.instance().CatalogReadOnly.ex(); } if (manageReposSession) { repos.beginReposSession(); } // NOTE jvs 12-Jan-2007: don't change state until AFTER successfully // beginning a transaction; if beginReposTxn throws an excn, // we want to stay in State.NO_TXN repos.beginReposTxn(true); state = State.WRITE_TXN; }