[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[aspectj-users] Advice is not applied if the callee and caller are in different modules.

I  am facing one problem in aspectj.
Suppose i have two modules UserSecurityCredentialLayer and UserSecurityCredential.
My aspect is defined in module UserSecurityCredentialLayer.
Our aspect is defined as
 pointcut wormHoleUsage(User user)
 : execution(* *.callUserCredential(..))&& args(user);
 pointcut wormHoleLayer(UserCredentialLayer ucl)
 :execution(public * layer.UserCredentialLayer.*(..)) && this(ucl)
  && !execution(public * layer.UserCredentialLayer.getUser(..))
  && !execution(public * layer.UserCredentialLayer.setUser(..));
 pointcut wormHole(User user, UserCredentialLayer ucl)
 : cflow(wormHoleUsage(user)) && wormHoleLayer(ucl);
 before(User user, UserCredentialLayer ucl)
 : wormHole(user, ucl) {
Aspect is defined in module UserCredential and class 'UserCrednetialLayer' is defined in module UserCredentialLayer i.e they are in different modules.
In this case advice is not applied. But if i put UserCrednetialLyaer in the same module, it is working properly.
Can any of u give me suggestion, how to soleve this issue.