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

Hi Simone,
 
Ya module means aspectj projects.
We are now able to solve the issue. We  put the desired jar in aspectj inpath. Now it is working.
Thanks for your support.
 
Regards,
Mritunjay

On Mon, Jul 21, 2008 at 4:32 PM, Simone Gianni <simoneg@xxxxxxxxxx> wrote:
Hi Mritunjay,
what do you mean by module? Eclipse projects? Separate Jars? Which
weaving method are you using?

You should look at the aspectpath and inpath configuration directives,
in eclipse and/or in your ant-task/maven-plugin/ajc-invocation to make
aspects from one jar advice methods in another jar.

Simone

Mritunjay Kumar wrote:
> 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) {
>        ucl.setUser(user);
>     }
>
> 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.
>
> Regards,
> Mritunjay
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> aspectj-users mailing list
> aspectj-users@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/aspectj-users
>


--
Simone Gianni
http://www.simonegianni.it/
CEO Semeru s.r.l.
Apache Committer

_______________________________________________
aspectj-users mailing list
aspectj-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/aspectj-users