Load-Time Weaving for WebSphere Available

Posted on October 1, 2005


Ramnivas and I are working on an interesting project applying AspectJ to do fine-grained security in a WebSphere 6.0 environment. We wanted to use load-time weaving to let us build modules separately in the RAD IDE and then weave our aspects at load-time. We also wanted to mock the EJB container behavior for integration tests. However, WebSphere 6.0 uses IBM’s Java 1.4 VM that doesn’t support any Java agents for weaving.

However, I was able to track down the details of the WebSphere ClassLoader Plug In API (the hard part) and write a simple Plug In that lets you do load-time weaving with AspectJ 5 for application classes in WebSphere using its embedded Java 1.4 VM. For older WebSphere implementations, this should also work on their Java 1.3 VM’s. You can download the jar and also read about how to use it in more detail at the AspectJ bugzilla report in which I contributed it (see https://bugs.eclipse.org/bugs/show_bug.cgi?id=111027).