|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.mybatis.spring.transaction.SpringManagedTransaction
public class SpringManagedTransaction
SpringManagedTransaction handles the lifecycle of a JDBC connection.
It retrieves a connection from Spring's transaction manager and returns it back to it
when it is no longer needed.
If Spring's transaction handling is active it will no-op all commit/rollback/close calls assuming that the Spring transaction manager will do the job.
If it is not it will behave like JdbcTransaction.
| Constructor Summary | |
|---|---|
SpringManagedTransaction(DataSource dataSource)
|
|
| Method Summary | |
|---|---|
void |
close()
|
void |
commit()
|
Connection |
getConnection()
|
void |
rollback()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SpringManagedTransaction(DataSource dataSource)
| Method Detail |
|---|
public Connection getConnection()
throws SQLException
getConnection in interface org.apache.ibatis.transaction.TransactionSQLException
public void commit()
throws SQLException
commit in interface org.apache.ibatis.transaction.TransactionSQLException
public void rollback()
throws SQLException
rollback in interface org.apache.ibatis.transaction.TransactionSQLException
public void close()
throws SQLException
close in interface org.apache.ibatis.transaction.TransactionSQLException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||