Class ManagedTransaction
java.lang.Object
org.apache.ibatis.transaction.managed.ManagedTransaction
- All Implemented Interfaces:
Transaction
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.- Author:
- Clinton Begin
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionManagedTransaction(Connection connection, boolean closeConnection) ManagedTransaction(DataSource ds, TransactionIsolationLevel level, boolean closeConnection) -
Method Summary
-
Constructor Details
-
ManagedTransaction
-
ManagedTransaction
-
-
Method Details
-
getConnection
Description copied from interface:TransactionRetrieve inner database connection.- Specified by:
getConnectionin interfaceTransaction- Returns:
- DataBase connection
- Throws:
SQLException- the SQL exception
-
commit
Description copied from interface:TransactionCommit inner database connection.- Specified by:
commitin interfaceTransaction- Throws:
SQLException- the SQL exception
-
rollback
Description copied from interface:TransactionRollback inner database connection.- Specified by:
rollbackin interfaceTransaction- Throws:
SQLException- the SQL exception
-
close
Description copied from interface:TransactionClose inner database connection.- Specified by:
closein interfaceTransaction- Throws:
SQLException- the SQL exception
-
openConnection
- Throws:
SQLException
-
getTimeout
Description copied from interface:TransactionGet transaction timeout if set.- Specified by:
getTimeoutin interfaceTransaction- Returns:
- the timeout
- Throws:
SQLException- the SQL exception
-