Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-users] How to debug aspectjweaver (for LTW)?

There is a Java agent, that weaves the aspects to the classes when the class is being loaded. As far as I know it tries to weave n runtime any aspect that the agent can think of. The aspects must be declared on the xml file OR exist on the aspectpath.

2010/1/16 Kay Kay <kaykay.unique@xxxxxxxxx>
Related or otherwise, LTW internally relates to a Singleton ApplicationContext and (hence, if there were multiple application contexts, LTW behavior is undefined ). not sure how spring 3.0 has changed in that aspect.  ( and not to mention, the necessity of a javaagent.jar for instrumentation).

But , may be a better alternative might be to try Compile time weaving (and it is easy to write some automated tests around that ) to preserve the weaving functionality.  My $ 0.02 .



On 01/12/2010 04:58 PM, Satish Terala wrote:
Hi

I am using AspectJ 1.6.2 with Spring 3.0 support for LTW. This is a follow up to an issue I posted a while back on this list and did not follow up.
I use AspectJ LTW in concert with Spring 3.0 in my application. I have a few aspects that are woven by AspectJ runtime and few others where I would like to use Spring's proxy style aspects.

In certain cases, I find that AspectJ runtime weaves aspects (declared with @Aspect annotation) that have not been declared in the aop.xml, consequently Spring refuses to apply these aspects using its proxy mechanism since it detects that AspectJ runtime has already woven it(by looking at the fields starting with 'ajc$' names).

I have tried replicating this in a standalone application so as to submit a bug report, but I am unable to replicate the issue in this standalone app.I wonder if this is an issue in my application itself.

What I would like is some pointers in terms of understanding how AspectJ runtime scans the aspects to weave and what gets woven.I was hoping some one could point me to the classes where this scanning (and the decisions to weave/not-weave happen) so that I can debug and see whats happening at load time and check why my undeclared aspects gets woven at all.

Thanks
-Satish
_______________________________________________
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


Back to the top