There are some quotes I would like to comment.
First, the bytecode manipulation at class load time is standardized in J2SE 5 - JSR 163 - including for complex class loading scheme of Application servers.
AspectWerkz includes support for it since 1.0beta1 released in June [
http://blogs.codehaus.org/projects/aspectwerkz/archives/000768_aspectwerkz_10beta1_is_out.html].
Thus enabling AOP in Java 5 VM is reduced to:
java -javaagent:aop.AspectWerkzAgent -classpath ... my.Main
Second, BEA JRockit is supporting this feature since 2 years ago - that is both for Java 1.3 and 1.4.
AspectWerkz ships with a specific JRockit module to make use of that since November 2003 (
http://blogs.codehaus.org/people/avasseur/archives/000256_aspectwerkz_announces_support_for_bea_jrockit.html)
Enabling AOP is then reduced to:
java -Xmanagement:class=aop.JRockitAspectWerkz -classpath ... my.Main
For other cases, we provide a cross platform mechanims that allows to have the same level of feature. It is a bit more complex than that, but for example we support IBM JRE 1.3 to enable AOP in WebSphere.
Messing with classloaders for bytecode instrumentation and AOP integration has reach a proven maturity and a standard. I guess that as JBoss just did, other AOP framework or bytecode based framework will align and make use of JSR-163/JVMTI.
Last, as Bill quotes, he will provide Annotation defined aspect support in JBoss 1.0 soon. We provide this syntax in AspectWerkz since the early days, thanks to a great idea from Ron Bodkin.
For now, it is some javadoc tags, but as J2SE 5 Annotations are out, the same will be achieved in the month to come, meaning that an Aspect will be just a regular java source snip.
Today an AspectWerkz aspect looks like the following:
class MyAspectWithAnnotations {
/**
* @Expression execution(* testAOP.HelloWorld.greet(..))
*/
Pointcut greet;
/**
* @Before greet && args(s)
*/
public void beforeGreeting(JoinPoint joinPoint, s) {
System.out.println("before greeting... " + s);
}
}
And the META-INF/aop.xml snip - is reduced to
<aspectwerkz>
<system id="test">
<aspect class="MyAspectWithAnnotations"/>
</system>
</aspectwerkz>
Though someone could define some more structures in the XML to allow deployment time definition or refinement of annotations defined aspects.
Conclusion: all the sparkling ideas used and implemented by various AOP frameworks like AspectJ, AspectWerkz and JBoss have started to gain consistency with J2SE 5 Annotations and other JSRs.
As Bill explains in his (good) article, AOP and Annotations is getting to be a perfect fit, not only to plug AOP in your apps but to write your owns aspect.
From this little comparison, it seems that the competition/mimics between AOP frameworks tends to reach a stage where a standardization would make sense, although it has implicitly started by the use of new J2SE 5 features.
Alex