|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.ibatis.transaction.managed.ManagedTransaction
public class ManagedTransaction
Transaction
that lets the container manage the full lifecycle of the transaction.
Delays connection retrieval until getConnection() is called.
Ignores all commit or rollback requests.
By default, it closes the connection but can be configured not to do it.
ManagedTransactionFactory
Constructor Summary | |
---|---|
ManagedTransaction(Connection connection,
boolean closeConnection)
|
|
ManagedTransaction(DataSource ds,
TransactionIsolationLevel level,
boolean closeConnection)
|
Method Summary | |
---|---|
void |
close()
Close inner database connection. |
void |
commit()
Commit inner database connection. |
Connection |
getConnection()
Retrieve inner database connection |
protected void |
openConnection()
|
void |
rollback()
Rollback inner database connection. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ManagedTransaction(Connection connection, boolean closeConnection)
public ManagedTransaction(DataSource ds, TransactionIsolationLevel level, boolean closeConnection)
Method Detail |
---|
public Connection getConnection() throws SQLException
Transaction
getConnection
in interface Transaction
SQLException
public void commit() throws SQLException
Transaction
commit
in interface Transaction
SQLException
public void rollback() throws SQLException
Transaction
rollback
in interface Transaction
SQLException
public void close() throws SQLException
Transaction
close
in interface Transaction
SQLException
protected void openConnection() throws SQLException
SQLException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |