Wednesday, November 12, 2003

AspectWerkz announces support for BEA JRockit

(imported from, read comments there)

The latest snapshot of AspectWerkz is now supporting JRockit JVM for on the fly weaving.

By using JRockit JMAPI capabilities, AspectWerkz brings AOP one step ahead by officially supporting all major JVM (Sun, IBM, BEA). This allows to hook AspectWerkz in a seamless way to provide dynamic on the fly weaving of Aspects no matter your environment.

JRockit could not be supported before due to lack of HotSwap support and a limitation that forbids overriding of java.lang.ClassLoader with a -Xbootclasspath option. Users had to use offline mode until there.

The extension will be core part of coming 0.9 AspectWerkz release, so that all VM are supported with the smallest integration cost (Sun, IBM, JRockit).

Tests have been made with

  • JRockit 7SP4 (java 1.3.1)

  • JRockit 8.1SP1 (java 1.4.1_03)

The JMAPI JRockit API (management API) allows to add a classPreProcessor mechanism using a java snip or a command line option.

A single VM is thus running at full speed, both under java 1.3 and 1.4, without having to use bootclasspath override.

The classPreProcessor instance is responsible to modify bytecode of the class at load time. AspectWerkz was already providing this classPreProcessor based architecture since summer 2003 for Sun VM and Q3 2003 for IBM VM.

It is possible to hook or unhook AspectWerkz programmatically using JMAPI:

new JRockitPreProcessor());

To launch a JVM with AspectWerkz hooked in for class load time weaving this consists of a single option:

-Xmanagement:class=org.codehaus.aspectwerkz.extension.jrockit.JRockitPreProcessor ....

If you are a JRockit fan, please help us and give a try to AspectWerkz online mode by your own. We need your feedback to make it suits your needs.

We will provide extensive documentation with the 0.9 release, but for the impatient :

  • grab a CVS snapshot

  • check bin/aspectwerk scripts to adapt them for JRockit (one line is commented out - notice that AspectWerkz needs to be in bootclasspath due to JMAPI)

  • have a look at org.codehaus.aspectwerkz.extension.jrockit.JRockitPreProcessor in src/extensions/

  • compile extensions.jar with ant/maven aspectwerkz:extensions:compile

  • give it a try