Package me.danwi.sqlex.spring
Class SpringManagedTransactionManager
java.lang.Object
me.danwi.sqlex.spring.SpringManagedTransactionManager
- All Implemented Interfaces:
TransactionManager
由spring框架托管的事务管理器
-
Constructor Summary
ConstructorsConstructorDescriptionSpringManagedTransactionManager(DataSource dataSource, ExceptionTranslator translator) -
Method Summary
Modifier and TypeMethodDescription获取当前存在的事务获取默认事务管理级别直接获取数据库连接(手动挡)newTransaction(Integer transactionIsolationLevel) 新建事务Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface me.danwi.sqlex.core.transaction.TransactionManager
newTransaction
-
Constructor Details
-
SpringManagedTransactionManager
-
-
Method Details
-
getDefaultIsolationLevel
Description copied from interface:TransactionManager获取默认事务管理级别- Specified by:
getDefaultIsolationLevelin interfaceTransactionManager- Returns:
- 默认事务管理级别
-
getCurrentTransaction
Description copied from interface:TransactionManager获取当前存在的事务- Specified by:
getCurrentTransactionin interfaceTransactionManager- Returns:
- 当前正在进行的事务, 没有则返回空
-
newTransaction
Description copied from interface:TransactionManager新建事务- Specified by:
newTransactionin interfaceTransactionManager- Parameters:
transactionIsolationLevel- 事务隔离级别- Returns:
- 新建立的事务
-
newConnection
Description copied from interface:TransactionManager直接获取数据库连接(手动挡)- Specified by:
newConnectionin interfaceTransactionManager- Returns:
- 数据库连接
-