geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kevan Miller <kevan.mil...@gmail.com>
Subject Re: Use of AspectJ load time weaving in Geronimo
Date Mon, 13 Jul 2009 18:11:08 GMT
Hi Dan,

On Jul 13, 2009, at 11:26 AM, Dan Becker wrote:

> I've been implementing an Aspect Oriented Programming (AOP)  
> profiling and timing system on some of my web application code. I've  
> been able to Load Time Weave (LTW) my application code using plain  
> Apache Tomcat by placing the following AOP configuration file in WEB- 
> INF/classes/META-INF/aop.xml:
>
> <!DOCTYPE aspectj PUBLIC "-//AspectJ//DTD//EN" "http://www.eclipse.org/aspectj/dtd/aspectj.dtd

> ">
> <aspectj>
>    <weaver options="-verbose -showWeaveInfo">   	
>        <!-- Weave classes in our application-specific packages -->
>        <include within="com.mycompany.myapp..*"/>
>    </weaver>
>
>    <aspects>
>    	<aspect name="com.mycompany.myapp.PointcutDefs"/>
>    	<aspect name="com.mycompany.myapp.ProfilingAspect"/>
>    </aspects>
> </aspectj>
>
> However, when I try the same operation in Geronimo 1.1.1 (J2EE  
> version with Tomcat), I do not see the weaver weaving, nor do I  
> catch any of the application code with the pointcuts or the aspects.

I assume you're using G 1.1.1 for a reason. Have you tried 2.1.4?

You must be doing more than simply creating an aop.xml file.  
Otherwise, how is AspectJ getting loaded/triggered to read the  
configuration file?

>
> Have other people tried AOP with Geronimo? Have they been successful  
> load time weaving with such a configuration file? Pointers to any  
> AOP examples with Geronimo are appreciated.

Maybe others who have used it. I've never tried it. But interested to  
see it running. Even more interested to see it on G 2.1.4 :-P, but  
happy to help with 1.1.1, also...

Prolly best to follow up on our user@ list...

--kevan



Mime
View raw message