| java.lang.Object net.sourceforge.orbroker.BrokerConnection net.sourceforge.orbroker.QueryableConnection net.sourceforge.orbroker.ExecutableConnection net.sourceforge.orbroker.Transaction
close | public void close()(Code) | | Close transaction. If Transaction has not been explicity committed
or rolled back, it will automatically be rolled back on close. This can
simplify code by automatically rolling back on close:
Transaction txn = broker.startTransaction();
try {
txn.setParameter("account", account);
txn.execute("updateAccount");
txn.commit();
] finally {
txn.close();
}
There is no need to issue a rollback. If commit() is not called due to an exception,
rollback is done automatically.
This is assuming that the transaction is in isolation level other than
Connection.TRANSACTION_NONE .
|
obtainExecutable | public Executable obtainExecutable()(Code) | | Obtain an Executable that uses this Transaction's connection.
This class provides safe semantics for other methods that
need to take part in the transaction, without exposing commit
or rollback capabilities.
The Executable will be automatically released and invalidated when
Transaction is closed.
Executable See Also: Transaction.close() See Also: Broker.obtainExecutable(Connection) |
Methods inherited from net.sourceforge.orbroker.ExecutableConnection | public int execute(String statementID) throws BrokerException, ConstraintException, DeadlockException(Code)(Java Doc) public int executeBatch(String statementID, String batchParameterName, Collection batchParameters) throws BrokerException, ConstraintException, DeadlockException(Code)(Java Doc) public int[] executeBatch(String statementID, String batchParameterName, Object[] batchParameters) throws BrokerException, ConstraintException, DeadlockException(Code)(Java Doc) protected Statement getStatement(String statementID) throws BrokerException(Code)(Java Doc) abstract protected void markTransactionStarted()(Code)(Java Doc) public void releaseSavepoint(Savepoint savepoint)(Code)(Java Doc) public void rollback(Savepoint savepoint)(Code)(Java Doc) public Savepoint setSavepoint()(Code)(Java Doc) public Savepoint setSavepoint(String name)(Code)(Java Doc)
|
Methods inherited from net.sourceforge.orbroker.QueryableConnection | final public void closeIterator(Iterator iterator)(Code)(Java Doc) final protected QueryResult executeQuery(Statement stm, boolean useScrollable) throws BrokerException(Code)(Java Doc) public Iterator iterate(String statementID, int fetchSize)(Code)(Java Doc) final public List selectMany(String statementID) throws BrokerException(Code)(Java Doc) final public int selectMany(String statementID, Collection resultCollection) throws BrokerException(Code)(Java Doc) final public int selectMany(String statementID, Collection resultCollection, int startRow, int rowCount) throws BrokerException(Code)(Java Doc) final public List selectMany(String statementID, int startRow, int rowCount) throws BrokerException(Code)(Java Doc) final public Object selectOne(String statementID) throws BrokerException, MoreThanOneRowException(Code)(Java Doc) final public boolean selectOne(String statementID, Object resultObject) throws BrokerException, MoreThanOneRowException(Code)(Java Doc) public Object selectOneFromMany(String statementID, int fromRow) throws BrokerException(Code)(Java Doc)
|
|
|