public class ManagedTransaction extends Object implements Transaction
| Constructor and Description |
|---|
ManagedTransaction(Connection connection,
boolean closeConnection) |
ManagedTransaction(DataSource ds,
TransactionIsolationLevel level,
boolean closeConnection) |
| Modifier and Type | Method and Description |
|---|---|
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.
|
public ManagedTransaction(Connection connection, boolean closeConnection)
public ManagedTransaction(DataSource ds, TransactionIsolationLevel level, boolean closeConnection)
public Connection getConnection() throws SQLException
TransactiongetConnection in interface TransactionSQLExceptionpublic void commit()
throws SQLException
Transactioncommit in interface TransactionSQLExceptionpublic void rollback()
throws SQLException
Transactionrollback in interface TransactionSQLExceptionpublic void close()
throws SQLException
Transactionclose in interface TransactionSQLExceptionprotected void openConnection()
throws SQLException
SQLExceptionCopyright © 2010–2015 MyBatis.org. All rights reserved.