spring 事务传播问题
来源:互联网 发布:mac上的日记软件 编辑:程序博客网 时间:2024/05/30 05:42
spring 事务配置:
<tx:attributes> <tx:method name="add*" propagation="REQUIRED" /> <tx:method name="get*" read-only="true"/></tx:attributes>
ServiceA
ServiceA { add(){ }}
ServiceB
ServiceB { notTransation() { sql:addEntity; } get() { sql:addEntity; }}
解释:应该是这种没有加入事物的方法调用就类似于 notTransation这个方法体里面的方法全部在add()调用一样。可以提交为ServiceA内部方法调用(这种方式也不会触发事务的传播性)
ServiceB.add调用get可以insert数据
解释: 这个很好理解 REQUIRED的传播就是存在事务就不新建事务
也就是说add新建了一个可写事务,传播到get不会新建一个readonly事务 而是还会用可写事务
0 0
- spring 事务传播问题
- Spring事务传播机制问题
- spring 的事务问题,事务失效,事务传播
- Spring事务传播问题 — PROPAGATION_REQUIRES_NEW
- Spring事务传播问题小案例
- spring事务--传播策略
- Spring 事务传播属性
- spring事务传播特性
- Spring事务传播机制
- Spring事务传播机制
- Spring事务传播机制
- spring事务传播属性
- spring事务传播图解
- spring事务传播机制
- Spring事务传播机制
- Spring事务传播特性
- Spring事务传播机制
- spring事务传播特性
- HTML
- Android 动画 收集网站链接
- Android Core框架使用手册
- bootstrap的使用
- Java中System.loadLibrary() 的执行过程
- spring 事务传播问题
- [js][json]前台页面中json和字符串相互转化
- 我的第一次份实习工作-iOS实习生-第一个月
- 编程苦手 Pixhawk 受难录 一
- mangos源码分析
- python面试题
- oracle的order by排序中空字符串处理方法
- MyBatis学习总结(1)——MyBatis快速入门
- 关于开源云计算平台软件的一些个人想法