Spring事务中Propagation.REQUIRES_NEW不起作用
来源:互联网 发布:免费装修设计软件 编辑:程序博客网 时间:2024/06/08 12:36
在Spring MVC Service中如果需要重新启用一个事务需要配置Propagation.REQUIRES_NEW,这时,应当保证内外层两个方法不能再同一个类中。
public class ServiceA{@Transactional(readOnly = false)public void methodA(){// do somethingServiceB.methodB();// do something}}public class ServiceB{@Transactional(readOnly = false,propagation = Propagation.REQUIRES_NEW)public void methodB(){// do something}}
如果方法B执行成功,在方法A执行失败回滚后,方法B并不会回滚。
0 0
- Spring事务中Propagation.REQUIRES_NEW不起作用
- spring 事务Propagation.REQUIRES_NEW 不起作用的原因
- spring中事务配置REQUIRES_NEW不起作用
- spring 事务REQUIRES_NEW 不起作用的解决方法
- spring 事务REQUIRES_NEW 不起作用的解决方法
- spring 事务REQUIRES_NEW 不起作用的解决方法
- spring事务 Propagation.REQUIRES_NEW、Propagation.NESTED、Propagation.REQUIRED使用时候发现的
- 事务 @Transactional 的 Propagation.REQUIRES_NEW
- spring事务REQUIRED REQUIRES_NEW区别
- Spring事务传播机制-REQUIRES_NEW
- SPRING中PROPAGATION类的事务属性
- Spring中事务的Propagation讲解
- spring的事务NEST与REQUIRES_NEW区别
- Spring事务 REQUIRES_NEW、NESTED与NOT_SUPPORTED
- Spring事务REQUIRED与REQUIRES_NEW区别
- spring事务传播机制-REQUIRED嵌套REQUIRES_NEW
- Spring中Propagation类的事务属性详解
- Spring中Propagation类的事务属性详解
- C++中类成员函数作为回调函数 [转]
- 浅谈JDBC连接SQL Server 2005的几个关键点
- Android 动态改变组件大小
- 关于spring restful使用中遇到的一个性能问题
- 从TCP协议的原理来谈谈rst复位攻击
- Spring事务中Propagation.REQUIRES_NEW不起作用
- 人一旦开始走就停不下来了
- Radar Installation(贪心)
- LeetCode:Climbing Stairs
- 数据结构之三元组顺序表实现稀疏矩阵运算(参考整理严蔚敏数据结构)
- android学习笔记之使用ClipDrawable
- AFX_msg
- Android仿iOS启动界面
-