I have been struggling for a while with the following issue. When I configure the following transactions are still being rolled back:
Spring IDE confirms that the pointcut is valid and I also see it working runtime. The only weird thing is that if the ProvisioningException is thrown in a manager a rollback is still initiated since I see the following exception being thrown from the manager:Code:<tx:advice id="txPrvAdviceManager" transaction-manager="transactionManager"> <tx:attributes> <tx:method name="process*" propagation="REQUIRED" no-rollback-for="nl.test.provisioning.core.business.manager.exception.ProvisioningException" /> <tx:method name="get*" propagation="NEVER" /> <tx:method name="set*" propagation="NEVER" /> </tx:attributes> </tx:advice> <aop:config> <aop:pointcut id="prvManagerOperation" expression="execution(* nl.test.provisioning.core.business.manager.impl.*ManagerImpl.*(..))" /> <aop:advisor advice-ref="txPrvAdviceManager" pointcut-ref="prvManagerOperation" /> </aop:config>
I expect the ProvisioningException to be thrown but that doesn't happen since it for some reason ignores my AOP configuration.Code:org.springframework.transaction.UnexpectedRollbackException: Transaction rolled back because it has been marked as rollback-only
Does anybody know what I am doing wrong?


Reply With Quote