JdbcTemplate 事物无法回滚!

cuixianfei521 2015-08-19 10:02:40
<tx:advice id="txAdvices" transaction-manager="txManager">
<!-- the transactional semantics... -->
<tx:attributes>
<!-- all methods starting with 'get' are read-only -->
<tx:method name="get*" read-only="true" />
<tx:method name="find*" read-only="true" />
<!-- other methods use the default transaction settings (see below) -->
<tx:method name="*" propagation="REQUIRED" rollback-for="java.lang.RuntimeException"/>
</tx:attributes>
</tx:advice>


<!--jdbc事物-->
<aop:config>
<aop:pointcut id="serviceMethodsjdbc" expression="execution(* com.starscube.prms.service.ext..*(..))" />
<aop:advisor advice-ref="txAdvices" pointcut-ref="serviceMethodsjdbc" />
</aop:config>


<!--jdbc事物-->
<bean id="txManager" class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
<property name="dataSource" ref="dataSource" />
</bean>


我在 实现类面 action 调用实现类中的 A方法 在A方法中在调用B方法,当A执行报错够B方法中的事物无法回滚。
...全文
694 1 打赏 收藏 转发到动态 举报
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
cuixianfei521 2015-08-19
  • 打赏
  • 举报
回复
自己顶一下吧!

3,405

社区成员

发帖
与我相关
我的任务
社区描述
专题开发/技术/项目 设计模式
社区管理员
  • 设计模式
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧