June 2003
[ jonas ] 10:52, Monday, 30 June 2003
JMangler will change its license back to LGPL (for some reason they changed to GPL for the 3.x release).

The change to GPL did of course cause a lot of problems for AspectWerkz (which is licensed under LGPL and uses JMangler) and I have since then tried to persuade the JMangler team to change its license back to LGPL.

Yesterday I recieved this letter from Michael Austermann, the creator of JMangler:

Hi Jonas, I've been to canda for the last weeks and was unable to read/reply any emails. We will change the the licence of JMangler back to LGPL within the next one or two weeks. Michael
So for all of you who have hesitated in using AspectWerkz in a commercial application: go for it, you will love it. :-)

[ jonas ] 11:44, Friday, 20 June 2003
AspectWerkz version 0.6.3 has been released.

I have among other things rewritten the whole definition and weave model implementation to support a much more powerful join point model. The join point model now have the essence of the AspectJ model.

Here are some of the features/changes:

  • 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.
Here is an example of the new definition:
<aspectwerkz>
    <!-- ============================================= -->
    <!--  Define the advices                           -->
    <!-- ============================================= -->
    <advice-def name="log"
                advice="advices.LoggingAdvice"
                deployment-model="perInstance"/>

    <advice-def name="cache"
                advice="advices.CachingAdvice"
                deployment-model="perClass"/>

    <advice-def name="persistent"
                advice="advices.PersistenceAdvice"
                deployment-model="perJVM"/>

    <advices-def name="log_and_cache">
        <advice-ref name="log"/>
        <advice-ref name="cache"/>
    </advices-def>

    <!-- ============================================= -->
    <!--  Define the introductions                     -->
    <!-- ============================================= -->
    <introduction-def name="serializable"
                      interface="java.io.Serializable"/>

    <introduction-def name="mixin"
                      interface="mixins.Mixin"
                      implementation="mixins.MixinImpl"
                      deployment-model="perInstance"/>

    <!-- ============================================= -->
    <!--  Define the abstract aspects                  -->
    <!-- ============================================= -->
    <abstract-aspect name="MyAbstractAspect">
        <advice pointcut="setters AND !getters">
            <advices-ref name="log_and_cache"/>
        </advice>

        <advice pointcut="persistentFields">
            <advice-ref name="persistent"/>
        </advice>
    </aspect>

    <!-- ============================================= -->
    <!--  Define the aspects                           -->
    <!-- ============================================= -->
    <aspect name="MyAspect" extends="MyAbstractAspect">
        <introduction class="domain.*">
            <introduction-ref name="serializable"/>
            <introduction-ref name="mixin"/>
        </introduction>

        <pointcut-def name="setters" type="method" pattern="String domain.*.set*(..)"/>
        <pointcut-def name="getters" type="method" pattern="String domain.*.get*(..)"/>
        <pointcut-def name="persistentFields" type="setField" pattern="* domain.*.*">
    </aspect>
</aspectwerkz>
You can download the new release from the releases page

Enjoy.