|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.torque.util.TransactionManagerImpl
public class TransactionManagerImpl
Standard connection and transaction management for Torque. Uses JDBC connection operations and Torque's own database pools for managing connections and transactions.
Constructor Summary | |
---|---|
TransactionManagerImpl()
|
Method Summary | |
---|---|
Connection |
begin()
Begin a transaction by retrieving a connection from the default database connection pool. |
Connection |
begin(String dbName)
Begin a transaction by retrieving a connection from the named database connection pool. |
void |
commit(Connection con)
Commit a transaction and close the connection. |
void |
rollback(Connection con)
Roll back a transaction and release the connection. |
void |
safeRollback(Connection con)
Roll back a transaction without throwing errors if they occur. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public TransactionManagerImpl()
Method Detail |
---|
public Connection begin() throws TorqueException
begin
in interface TransactionManager
TorqueException
- Any exceptions caught during processing will be
rethrown wrapped into a TorqueException.public Connection begin(String dbName) throws TorqueException
begin
in interface TransactionManager
dbName
- Name of database.
TorqueException
- If the connection cannot be retrieved.public void commit(Connection con) throws TorqueException
commit
in interface TransactionManager
con
- The Connection for the transaction.
TorqueException
- Any exceptions caught during processing will be
rethrown wrapped into a TorqueException.public void rollback(Connection con) throws TorqueException
rollback
in interface TransactionManager
con
- The Connection for the transaction.
TorqueException
- Any exceptions caught during processing will be
rethrown wrapped into a TorqueException.public void safeRollback(Connection con)
safeRollback
in interface TransactionManager
con
- The Connection for the transaction.rollback(Connection)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |