Official Builds

Releases

The latest official release is 1.0

Download:

Release notes

New features and changes in release 1.0

  • AnnotationCTask to run AnnotaionC annotation compiler from Ant as a custom task (thanks to the_mindstorm(at)evolva(dot)ro)
  • AspectWerkzCTask to run AspectWerkzC offline weaving from Ant as a custom task (thanks to the_mindstorm(at)evolva(dot)ro)
  • Minor bug fix when using META-INF/aop.xml in J2EE environments
  • Added verbosity on pointcut matchs with -Daspectwerkz.transform.details=true

New features and changes in release 1.0.RC3

  • Bug fix in Annotation matching when using offline mode weaving. Thanks to Allan Jones.
  • Bug fix in handler join point when Rtti is used.
  • ASM jars are now remapped and embedded in aspectwerkz-version.jar so that it is possible to use AspectWerkz within projects having a dependancy on a specific ASM version (e.g. cglib, Hibernate, Spring, Geronimo, etc).

    The bin/aspectwerkz scripts are thus not referencing ASM anymore. ASM is only used if you need to recompile the project or when doing framework debugging.
  • New sample for annotation matching (ant samples:annotation, ant samples:offline:annotation)

New features and changes in release 1.0.RC2

  • Better support for complex custom annotations, less requirements when writing the annotation proxy.
  • Fix in pointcut matching that lead to a slow weave time behavior in 1.0.RC1
  • Fixed an issue when using the join point RTTI in multi threaded environments or in case of reentrancy
  • Upgraded Javassist dependancy from 3.0beta to 3.0RC1
  • Upgraded to ASM 1.5.1
  • Removed piccolo.jar from the bin/ scripts since it is only required for Java 1.3 or JRockit (see FAQ, especially for use with WebLogic)
  • Other bug fixes

New features and changes in release 1.0.RC1

  • Support for args() in the pointcut expressions. As a consequence, support for direct access to arguments of advised method is possible and advices can have those parameters in their signature. See docs.
  • hasmethod and hasfield pointcuts (contributed by Michael Nascimento Santos)
  • J2SE 5 JVMTI (JSR-163) support updated for latest specification.
  • bin/aspectwerkz command line tool now provides autodetection of BEA JRockit and J2SE 5.
  • Support for pointcut expression defined in the XML body of the <pointcut> element.
  • Bug fixes.

New features and changes in release 1.0-beta2

  • Many bug fixes.

New features and changes in release 1.0-beta1

Amont many other things this release is shipped with a completely new pointcut grammar which is much more expressive and powerful, and rich annotation support for both typed and untyped annotations.

  • Support for deploying several aop.xml Aspect defintion/deployment files alongside deployed application ( WEB-INF/aop.xml, META-INF/aop.xml) and have them following the classloader hierarchy.
  • One single API to access both JavaDoc-style and Java 1.5 annotations, allows using them together seamlessly.
  • Typed and untyped annotations for JavaDoc-style annotations. Supports the same parameters types as Java 1.5 annotations and has strongly typed compile time checking (using a new annotation compiler).
  • within and withincode pointcuts
  • More expressive cflow pointcuts that can take any pointcut expression as "parameter" and can be used to build arbitrary nested expressions.
  • Matching on annotations.
  • Matching on modifiers (including !public and NOT static etc.)
  • Matching on subtypes for parameters and return values.
  • System wide pointcuts (in the XML deployment descriptor).
  • Pointcut references (refer to pointcuts defined in other aspects than the one you are using it in).
  • JSR-163 JVMTI support for Java 1.5 class load time weaving with -javaagent:
  • JoinPoint class is now serializable.
  • JoinPoint instances can be "resetted", to start over a complete advice chain (useful for failover etc.).
  • Documentation enhanced and refactored.
  • Introductory tutorials.
  • Some bug fixes.
  • Please note that there are changes to the way annotations (formerly call attributes) are complied and retrieved. F.e. AspectC has been replaced by AnnontationC and has slightly different options, so to compile the aspects use AnnotationC from now on.

New features and changes in release 0.10

This release is mainly a bug-fix release. Refer to release note of 0.10.RC2 and 0.10.RC1 for a list of new features as compared to 0.9.

  • A thread safe issue has been fixed in the join point execution model.
  • IBM JRE support has been fixed.
  • Unix/Linux comamnd line scripts has been fixed (was missing bcel.jar).
  • Exception throwned by method of weaved classes are not wrapped anymore. Exception throwned by mixin implementation are not wrapped anymore.
  • JIT JoinPoint compilation is now thread safe.
  • serialVersionUID computation fixed.
  • Due to a lack of within expression support in the pointcut grammar (addressed in 1.0), the handler pointcut are very expensive to match. Those are deactivated by default. If your system uses those handler pointcuts, you have to add the -Daspectwerkz.handler.pointcut=true JVM option when starting up your JVM.

New features and changes in release 0.10RC2

In this release is mainly a bug-fix release, but we have added some new functionality (and changed some APIs) as well:

  • Aspects does not have to extend the Aspect base class anymore, but can be any Java class and extend anything they like.


  • The JoinPoint class has these two methods:
    • getSignature() - which is used to retrieve the static signature for the join point.
    • getRtti() - which is used to retrieve the RTTI (Runtime Type Information) about the join point.
    Both these methods returns a base interface that could be used, but is usually best to cast to a more fine-grained and specific type.


  • Retrieval of information about the system, adding and reading of parameters and metadata etc. is done through the CrossCuttingInfo class. An aspect or mixin that is interested in accessing this info should have a constructor that takes a CrossCuttingInfo instance as its only parameter. See the docs for details.


  • Pluggable aspect container - The possibility to provide your own aspect container implementation is back. Useful if you need to control how your aspects are instantiated for example if you want that to be handled by an IoC container (Spring, PicoContainer etc.))

New features and changes in release 0.10RC1

AspectWerkz has gone through a lot of changes, the whole core engine has for example been thrown out and replaced by a much more flexible and performant one. The join point model is much more expressive and orthogonal we have also implemented a JIT compiler that is making AspectWerkz much more performant. On top of that we have a new implementation of true runtime weaving, which allows you to redefine your aspect model including adding new pointcuts at runtime.

We will not list all new features here, see the docs for details. But the main new features are these:

Expressiveness and orthogonality

We have improved the expressiveness and orthogonality a lot.

AspectWerkz currently supports the following join points:

  • method (static and member) execution
  • method (static and member) call
  • constructor execution
  • constructor call
  • field (static and member) modification
  • field (static and member) access
  • catch clauses
  • cflow

In the latest version we have reached a high level of orthogonality:

  • All advice types (around, after and before) works with all poincut designators (except for the handler pointcut which is only possible to bind to the before advice).
  • You can compose new pointcuts by mixing any types of pointcuts.
The syntax has changed slightly, both in the XML and annotation definition. However not more than that the migration should be fairly easy. See the docs for details on the new syntax.

Performance improvements and JIT compilation

We have implemented a JIT (Just-In-Time) compiler that detects advice chains that are often executed and generates a custom class on the fly that invokes the advice chain and the target join point statically.

Here are some simple but interesting benchmarks comparing the latest distribution of AspectWerkz, JBoss and AspectJ:

The overhead of one around advice applied to a method call join point:

AspectJ 1.1.1 0.000018 ms/call
AspectWerkz 0.10 RC1 0.000097 ms/call
JBoss AOP 1.0Beta 0.000181 ms/call

Runtime weaving

In addition to the capabilities to rearrange aspects and advices at existing join points and swapping mixin implementation at runtime, we provide a unique feature of adding new pointcuts at runtime without any prior knowledge. The implementation is based on Java HotSwap and thus requires a compliant JVM.

A simple API allows to refine the aspect definition to add new pointcuts and then trigger the activation of it. Prior to pointcuts addition, your programs are guaranteed to run without any overhead since the bytecode does not gets modified prior activation. Moreover the runtime weaving does not require to have a remote JVM to control the HotSwap API since we provide a dedicated in-process module.

New features and changes in release 0.9.x

  • Online architecture for class load time weaving supports IBM JRE and BEA JRockit
  • DTD has been refactored to support system element and deprecated syntax from 0.8.x has been removed
  • New self-defined / self-contained Aspect model based on metadata / JSR-175 concepts. The new Aspect model coexists with the 0.former model and both will be maintained since they target different needs
  • New pointcut algebra implementation
  • Released under LGPL-style license
  • Documentation reorganized for new Aspect model coverage
  • Bug fix (refer to Jira)

New features and changes in release 0.8.x

  • JDK 1.3 compatible.
  • New online architecture, with several options and java 1.3 support (not dependent on JMangler anymore).
  • New annotations -> XML compiler (no more metaData dir and meta-data compilers)
  • Offline compiler refactored. Now support rollback on error facility. (Note that the bin/aspectwerkz -offline must now be invocated with the definition file as first argument.)
  • Documentation updated and reorganized.
  • Released under a BSD-style license.
  • Tested and verified to work for EJBs under WLS using both online and offline mode.
  • Non-reentrancy configuration for join points.
  • Definition validator.

New features and changes in release 0.7.x

  • Pluggable custom defined join point controller. The join point controller gives you complete control over your advices at runtime (at certain join points).
  • Package namespaces and scopes in the XML definition.
  • cflow (control flow) pointcuts.
  • Performance improvement for advices by a factor of 2.
  • Many, many bugfixes (introduced by the new pointcut model implementation in 0.6.x).
  • The runtime annotations tags have changed. (They now have an aspectwerkz namespace and are using the same syntax as XDoclet.)
  • The prefix ___AW_ is now used at all introduced methods and fields. Including the Identifiable.getUuid method which is renamed to ___AW_getUuid
  • Documentation and examples have been updated.
  • Uses new version of JMangler (3.0.2) which is released under LGPL.

New features and changes in release 0.6.x

  • Completely new definition model. Aspects, advices, introductions and pointcuts are now completely orthogonal and the model now has the essence of the AspectJ model. See the documentation for details.
  • Abstract aspects definitions as well as pointcut expressions (e.g. ((pc1 OR pc2) AND !pc3) and similar).
  • Multiple weave models.
  • Multiple AspectWerkz system can run in the same JVM concurrently.
  • setField and getField now works for get and set java.util.* collection fields (e.g. add/get/remove/size and so on).
  • Advice and introduction container is now pluggable. I.e. the user can provide its own custom implementation (f.e. to enable persistence).
  • The transparent persistence of advices and introductions have been moved to the sandbox.
  • Many bug fixes.

New features and changes in release 0.5.x

  • Caller side pointcuts. I.e. the possibility to advise a method invocation (caller side) apart from method execution (callee side).
  • Fine-grained pattern language for picking out pointcuts. It is now possible to pick out method pointcuts by method name, parameter types and return type as well as field pointcuts by field name and field type. All these support regular expressions.
  • Runtime attributes for advices (method/field/throws). I.e. add meta-data to your methods/field/classes as JavaDoc tags which are picked up by the weaver and used as rule set when doing the transformations.
  • Class selectors for aspects. I.e. pick out classes using regular expressions.
  • Advising of static fields.
  • Parameters to advices. The possibility to pass parameters to advices through the XML definition.
  • Advice stacks. The possibility to define stacks/chains of advices that can be reused throughout the XML definition.
  • MethodAdvice has been renamed to AroundAdvice and the FieldAdvices has been renamed to PreAdvice and PostAdvice.
  • Creation and registration of new advices at runtime (in previous releases you could only add/remove/reorder existing advices).
  • Ant task for offline post-processing.
  • More flexible startup and definition handling process.
  • Multiple pattern declarations for pointcuts.
  • More documentation and examples.
  • Many many bugfixes.