[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[aspectj-users] Pointcut not being executed...

Hello,

I mean to intercept only calls of EntityManager.persist when the argument is of type trc.suivi.domain.Pli

I have tried the following code:

pointcut catchIt(Pli pli) : (call(* javax.persistence.EntityManager.persist(trc.suivi.domain.Pli)));
after(Pli pli) returning: catchIt(pli) {
log.debug("catchIt");
Evenement ev = new Evenement();
ev.setDateCreation(new Date());
ev.setIdObjetProprietaire(pli.getId());
evenementRepository.save(ev);
}

and nothing happens.

Can anyone please help?

Regards,

J.