<tx:advice id="oltpAdvise" transaction-manager="oltpTransactionManager">
<tx:attributes>
<tx:method name="refresh" rollback-for="Throwable" />
</tx:attributes>
</tx:advice>
<aop:config proxy-target-class="true" >
<aop:pointcut id="oltpPointCut_refresh" expression="execution(* com.a.b.c.refresh(..))"/>
<aop:advisor advice-ref="oltpAdvise" pointcut-ref="oltpPointCut_refresh"/>
<tx:attributes>
<tx:method name="refresh" rollback-for="Throwable" />
</tx:attributes>
</tx:advice>
<aop:config proxy-target-class="true" >
<aop:pointcut id="oltpPointCut_refresh" expression="execution(* com.a.b.c.refresh(..))"/>
<aop:advisor advice-ref="oltpAdvise" pointcut-ref="oltpPointCut_refresh"/>
</aop:config>
读作:
当执行到 com.a.b.c.refresh 的时候,与之关联 [由aop:advisor 关联] 的advise里面配置的refresh方法被事务进行管理,并对任何异常进行事务回滚。