Have you tried switching your pointcut from "execution" to "call" and see if that works any better?
[ Romain Muller | Software Development Engineer | +33 (0)6 48 25 66 70 | romain.mul...@esial.net ] Le 2 août 2012 à 15:49, Julien Martin a écrit : > Hello, > > I am trying to advise javax.persistence.EntityManager with AspectJ and > Spring. It just does not work: no error and no "caught" on the console... > > Here is my aspect: > > package trc.suivi.aspects; > > > public aspect EventManagerAspect { > > > public EventManagerAspect() {} > > > pointcut catchIt() : (execution(* > javax.persistence.EntityManager.persist(..))); > > > after() returning: catchIt() { > > System.out.println("caught"); > > } > > > } > > Here is how I configured my aspect in Spring: > > <bean class="trc.suivi.aspects.EventManagerAspect" factory-method="aspectOf"/> > Can anyone please help? > Regards, > Julien. > _______________________________________________ > aspectj-users mailing list > aspectj-users@eclipse.org > https://dev.eclipse.org/mailman/listinfo/aspectj-users
_______________________________________________ aspectj-users mailing list aspectj-users@eclipse.org https://dev.eclipse.org/mailman/listinfo/aspectj-users