[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
RE: [aspectj-users] AspectJ loadtime weaving limitation - Aspectwerkzsolution - Tomcat

Sweet! Thanks Andy. The latest version seems to work.  But, to weave
private/final methods, I had to put the aspect class in the same package
as that of the class whose private/final methods are being weaved.

Sunder





-----Original Message-----
From: aspectj-users-bounces@xxxxxxxxxxx
[mailto:aspectj-users-bounces@xxxxxxxxxxx] On Behalf Of Andy Clement
Sent: Wednesday, September 30, 2009 1:36 PM
To: aspectj-users@xxxxxxxxxxx
Subject: Re: [aspectj-users] AspectJ loadtime weaving limitation -
Aspectwerkzsolution - Tomcat

Have you tried a recent version of AspectJ? I believe this should be
working but I'm not an expert on classloaders and weavers in tomcat.

Andy

2009/9/29 Tatta, Sunder <statta@xxxxxxxxxxxxxxxxxxxxx>:
>
>
> There was a particular scenario where we saw the need to use AOP load 
> time weaving but we could not accomplish what we wanted using AspectJ 
> and
>
> were forced to resort to AspectWerkz.
>
> Case:
> We needed to apply an aspect around a method that was within a jar 
> file. The caller to that method was a method from another class within

> the same (or a
> different) jar file.
>
> Problem:
> The application was deployed on a Tomcat Server and we used 
> Aspectj(agent) to load the Tomcat container . The jar file (where we 
> wanted the aspect to
> exist) of an application deployed onto the Tomcat Server was loaded 
> via JarClassLoaded (Tomcat default behavior). The "aspecting" wasn't 
> working but when the method in the jar was being called directly from 
> any of the classes in the application (loaded by WebappClassLoader), 
> "aspecting" worked as expected.
>
> Solution:
> We were able to overcome that limitation when we used AspectWerkz (I 
> heard it hooks to all the existing class loaders except for
BootstrapClassLoader).
>
> Would this issue get resolved in future versions of AspectJ as it is 
> collaborating with AspectWerkz?
>
>
>
>
> _______________________________________________
> 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