Hi Brett, On 14 November 2010 12:41, javabrett <javabr...@gmail.com> wrote: > > This exercise sparked the following questions for me: > > 1) Is the no-search and explicit weaver-need for the annotation-based advice > behaviour change in 1.6.8 mentioned anywhere in the changes docs? I > couldn't spot it in the 1.6.8 README [2]. Might be a good one to point out > somewhere if not already noted, perhaps a FAQ entry for those using > annotation-style javac-compiled advice. > 2) To me it seems like the bulk of aop.xml examples are either pre this > change, or expect non-annotation-based advice or use of the ajc compiler > (which does the advice-weaving). I reckon most if not all examples of > aop.xml I've encountered do not include weaving directives for the advice > itself, only for the classes to be woven/advised at load-tim. It might be > worth having such an example with a commented <weaver> inclusion for an > annotation-style javac-compiled advice.
You are exactly right that previously (prior to 1.6.7 actually) it used to more actively search for annotation based aspects because they needed 'finishing off'. A change to this wasn't really made due to more people using ajc rather than javac, but because of the sheer cost of searching for annotation based aspects. Usually there are far fewer aspects than regular classes in a normal system, and the only way to discover annotation based aspects was by actually loading the bytes, it was found to drastically improve performance if the change was made requiring the user to actively list the aspects in the aop.xml file. I had thought some text to this effect had made it into either the 1.6.7 or 1.6.8 readmes. (1.6.7 covered the bulk of changes in this area, 1.6.8 was an emergency release a few days later to address some serious issues that were found with the big changes in 1.6.7). However, I double checked and it isn't - so I raised https://bugs.eclipse.org/bugs/show_bug.cgi?id=330269 as a placeholder bug to remind me to document it (and a FAQ entry would be nice, yes). Normally I would always say that all aspects should be listed in an aop.xml - without them listed reweaving won't work very well. Recently I had to address a situation where Spring Roo (which heavily uses aspects) was not listing all aspects and that caused reweaving to fail at application server startup time (due to Spring Insight, which uses LTW, attempting to reweave the Roo application). This was nothing to do with code style vs annotation style. My gut reaction is that you only need to list them in the aspects section so we know what they are - are you finding you also need to list them in the weaver section? (I would need to double check my expectations here.) cheers Andy _______________________________________________ aspectj-users mailing list aspectj-users@eclipse.org https://dev.eclipse.org/mailman/listinfo/aspectj-users