public static FenixTransaction currentFenixTransaction() { return (FenixTransaction) Transaction.current(); }
@Override protected void backendRollback() throws IllegalStateException, SystemException { if (Transaction.current() != underlyingTransaction) { throw new IllegalStateException("JVSTM does not support committing transactions from other threads!"); } Transaction.abort(); }
@Override protected void backendRollback() throws IllegalStateException, SystemException { if (Transaction.current() != underlyingTransaction) { throw new IllegalStateException("JVSTM does not support committing transactions from other threads!"); } Transaction.abort(); }
public static void registerNewObject(Object obj) { ((ConsistentTransaction) Transaction.current()).registerNewObject(obj); } }
@Override public E get() { return ((JvstmInFenixTransaction) Transaction.current()).getBoxValue(this); }
public static void registerNewObject(Object obj) { ((ConsistentTransaction)Transaction.current()).registerNewObject(obj); } }
@Override protected void backendCommit() throws RollbackException, HeuristicMixedException, HeuristicRollbackException, SecurityException, IllegalStateException, SystemException { if (Transaction.current() != underlyingTransaction) { throw new IllegalStateException("JVSTM does not support committing transactions from other threads!"); } try { Transaction.commit(); } catch (CommitException e) { throw new JvstmTransactionError(); } }
@Override protected void backendCommit() throws RollbackException, HeuristicMixedException, HeuristicRollbackException, SecurityException, IllegalStateException, SystemException { if (Transaction.current() != underlyingTransaction) { throw new IllegalStateException("JVSTM does not support committing transactions from other threads!"); } try { Transaction.commit(); } catch (CommitException e) { throw new JvstmCommitError(); } }
protected void persistentLoad(E value) { int txNumber = Transaction.current().getNumber(); persistentLoad(value, txNumber); }
/*synchronized */boolean reload() { return reload(Transaction.current().getNumber()); }
@Override public void reloadAttribute(VBox box) { int txNumber = jvstm.Transaction.current().getNumber(); List<VersionedValue> vvalues = getMostRecentVersions(box, txNumber); box.mergeVersions(vvalues); }
public void readFromResultSet(java.sql.ResultSet rs) throws java.sql.SQLException { int txNumber = Transaction.current().getNumber(); readSlotsFromResultSet(rs, txNumber); readMetaObjectFromResultSet(rs, txNumber); }
@Override public void reloadAttribute(VBox box) { int txNumber = jvstm.Transaction.current().getNumber(); List<VersionedValue> vvalues = getMostRecentVersions(box, txNumber); box.mergeVersions(vvalues); }
public static void storeNewObject(AbstractDomainObject obj) { currentDBChanges().storeNewObject(obj); ((ConsistentTransaction) Transaction.current()).registerNewObject(obj); }
public void put(E newE) { Transaction tx = Transaction.current(); if (tx == null) { tx = Transaction.beginInevitable(); tx.setBoxValue(this, newE); tx.commit(); } else { tx.setBoxValue(this, newE); } }
public void put(E newE) { Transaction tx = Transaction.current(); if (tx == null) { tx = Transaction.begin(); tx.setPerTxValue(this, newE); tx.commit(); } else { tx.setPerTxValue(this, newE); } }
public E get() { Transaction tx = Transaction.current(); if (tx == null) { tx = Transaction.begin(); E result = tx.getPerTxValue(this, initial); tx.commit(); return result; } else { return tx.getPerTxValue(this, initial); } }
public static Transaction begin(boolean readOnly) { ActiveTransactionsRecord activeRecord = null; Transaction parent = current(); if (TRANSACTION_FACTORY.reuseTopLevelReadOnlyTransactions() && parent == null && readOnly) { Transaction tx = getRecordForNewTransaction().tx; tx.start(); return tx; } if (parent == null) { activeRecord = getRecordForNewTransaction(); } return beginWithActiveRecord(readOnly, activeRecord); }
@Override public final void readFromResultSet(java.sql.ResultSet rs) throws java.sql.SQLException { int txNumber = Transaction.current().getNumber(); DO_State loadedState = make$newState(); readStateFromResultSet(rs, loadedState); // this state was already committed and is being read now loadedState.markCommitted(); obj$state.persistentLoad(loadedState, txNumber); readMetaObjectFromResultSet(rs, txNumber); }
@SuppressWarnings("static-access") public void put(int index, E newE) { rangeCheck(index); Transaction tx = Transaction.current(); if (tx == null) { tx = Transaction.begin(); tx.setArrayValue(new VArrayEntry<E>(this, index), newE); tx.commit(); } else { tx.setArrayValue(new VArrayEntry<E>(this, index), newE); } }