I am using Spring 3.0 with AspectJ and like use AspectJ more than AOP Proxies.
That seams to work for almost every concern, but not for the Persistence Exception Translation. – My Question is how to use AspectJ for Persistence Exception Translation instead of Spring JDK AOP Proxies?
The relevant parts of my configuration are:
<context:spring-configured/>
...
<context:component-scan />
....
<tx:annotation-driven mode="aspectj" transaction-manager="transactionManager" />
That should work out of the box if you compile against spring-aspects.jar. See
org.springframework.orm.jpa.aspectj.JpaExceptionTranslatorAspectfor reference. Perhaps its pointcuts don’t cover your scenario, in that case you need to extend the aspect with your own pointcuts. Here are the standard pointcuts included: