program       registration       lodging       call for contributions       organization       [aosd home]

overview       technical papers       practitioner reports       workshops       tutorials       demos       exhibits      
Go back to Demonstrations Home

JMangler - Load-Time Weaving for Java Class Files

Dates:
  -
Wed March 19, 16:00 - 17:30
  - Thu March 20, 14:00 - 15:30

Presenters:
  - GŁnter Kniesel (University of Bonn)
  - Michael Austermann (SCOOP Software GmbH)

AOSD improves separation of concerns by making it possible to express crosscutting concerns of a system modularly. However, modular expression of a concern requires techniques to "weave" the related code back into the code of all the affected classes.

JMangler is a freely available framework for load-time transformation of compiled Java programs, that provides a comprehensive infrastructure for load-time weaving. This means that an AOSD system can translate its aspects to JMangler transformer components and let them be applied at load-time. Alternatively, a knowledgeable programmer can use JMangler directly to express aspect-like crosscutting transformations of arbitrary application classes. Yet another option is to inject at load-time code that enables run-time weaving.

Load-time weaving has many advantages, the smallest being that it requies no source code and can hence be applied to third-party libraries. More importantly, it provides the guarantee that transformations will be applied to every class that will be executed at run-time, even if the class is created dynamically or loaded from some possibly remote host. Last, but not least, load-time weaving inherently processes only classes relevant to the running application and applies to them only the adaptations required in that context. It can therefore prevent static proliferation of adapted program versions that might never be used.

Unlike simple byte code transformation libraries JMangler provides a complete solution for hooking into the class loading process. It does so in a JVM and class loader independent way, which works also for classes that employ their own custom class loader. Therefore, it can transform any application classes and can be used in environments like application servers, which make heavy use of custom class loaders.

In addition to its general applicability, JMangler provides another unique feature. It is the only approach for load-time adaptation that provides a partial solution to the problem of aspect interference. For a certain class of transformations, it can guarantee that their joint use will not lead to undesired effects (interferences) even if the transformations have been developed independently, unaware of each other.

The demo will consist of two parts that will be presented piecemeal, in alternation: the introduction of the base concepts and the demonstration of their practical use. The shown examples will include, among others, a code coverage tool developed with JMangler. This is an application that requires transformations at the level of individual lines of code or individual statements, hence at a finer granularity than expressible in all high-level AOSD languages and systems that we know of.
 

Contact

For additional information, clarifications, questions, or special requirements, please contact the AOSD 2003 Demonstrations Chair: Mik Kersten (demos@aosd.net).

 Send comments to: webmaster@aosd.net