Hibernate事务回滚问题

时间:2014-12-24 11:01:40

标签: hibernate spring-mvc

我正在使用hibernate 4.0和spring 3.0作为我的Web应用程序。

当我在BaseController.handle *方法中抛出异常时,它没有得到回滚。 在这里,我的建议是回滚交易。

<tx:advice id="txAdvice" transaction-manager="txManager">
        <tx:attributes>
            <tx:method name="handleRequest*" rollback-for="Throwable" />
        </tx:attributes>
    </tx:advice>
    <aop:config  proxy-target-class="true">
        <aop:pointcut id="handleRequestOperation"
            expression="execution(* com.abc.BaseController.handle*(..))" />
    </aop:config>

0 个答案:

没有答案
相关问题