[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [aspectj-users] Advising javax.persistence.EntityManager with AspectJ not working
|
Using "call" works and "execution" does not.
Thanks a lot Romain!
2012/8/2 Romain Muller
<romain.muller@xxxxxxxxx>
Have you tried switching your pointcut from "execution" to "call" and see if that works any better?
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@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/aspectj-users
_______________________________________________
aspectj-users mailing list
aspectj-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/aspectj-users