Simple declarative transaction setup
This setup is not working, i.e. the services are not transaction.Code:<bean id="txManager" class="org.springframework.jdbc.datasource.DataSourceTransactionManager"> p:dataSource-ref="dataSource"/> </bean> <tx:advice id="txAdvice" transaction-manager="txManager"> <tx:attributes> <tx:method name="*" propagation="REQUIRED"/> </tx:attributes> </tx:advice> <aop:config> <aop:pointcut id="serviceOperation" expression="execution(* com.x.*.service..*Service.*(..))"/> <aop:advisor advice-ref="txAdvice" pointcut-ref="serviceOperation"/> </aop:config>
All service classes are created with BeanNameAutoProxyCreator with several advisors so I am guessing that perhaps the pointcut execution(public * com.x.*.service..*Service.*(..)) is the problem here. Any insight would be appreciated...


Reply With Quote