事务管理 原理
PlatformTransactionManager 接口
1 2 3 4 5 6 7 8 9
| public interface PlatformTransactionManager {
TransactionStatus getTransaction(@Nullable TransactionDefinition definition) throws TransactionException;
void commit(TransactionStatus status) throws TransactionException;
void rollback(TransactionStatus status) throws TransactionException;
}
|
PlatformTransactionManager实现类:
- HibernateTransactionManager
- DataSourceTransactionManager
- JtaTransactionManager
- JpaTransactionManager
##参考
@Transactional原理
Spring源码学习之十二:@Transactional是如何工作的
关于Spring+Mybatis事务管理中数据源的思考