December 2004
[ avasseur ] 12:08, Friday, 10 December 2004

I am pleased to announced the release of AspectWerkz 2.0.RC2

2.0.RC2 comes with feature completion as compared to 1.0:


  • cflow() is supported

  • handler() pointcut for use with before advice is supported

It comes with several bug fixes - thanks to all of you who provide feedback, test case and major fixes - many thanks to The Mindstorm, David Teare and the Summa team.

Aside, AspectWerkz 2.0.RC2 comes with new features:


  • custom proceed() method, to easily change advised target argument values from within
    an around advice. Read more here.

  • per instance interception framework, to programmatically configure advices for a given instance only at runtime. Read more here.

  • AW Proxy aware of the underlying aspects. Our custom proxy framework allows to use proxy (AspectWerkz proxy or CGLIB proxy) and have them be aware of the aspects at no extra cost. The performance of the AWProxy is comparable to straight AOP, they can be used with per instance interception, but they do not require the use of the weaver. The main drawback is that only method and constructor execution of non private / non final method can be advised (as for all proxy based AOP out there).
    Read more here.
    Read AW Proxy announce here

Read the release notes.
Get it now.

We also release AspectWerkz 1.1, a maintenance release for AspectWerkz 1.x.
Access AspectWerkz 1.1 release notes.

We hope you will give a try to 2.x instead of upgrading to 1.1 !

Alex

[ jonas ] 12:43, Friday, 3 December 2004

Unfortunately we had done a mistake in AOP benchmark article we published a couple of days ago. The mistake was when implementing some of the interceptors for dynaop (we used the API the wrong way when we wanted to access the proxied, 'target instance').

Before we accessed the 'target instance' like this:

    Object target = invocation.getProxy().getProxyContext().unwrap();
And now it has been changed to this:
    Object target = invocation.getProxy();

When correcting these mistakes dynaop performs up to 10 times better in the situations where we are accessing the 'target instance'.

The article has been updated with the new figures.

Thanks to Bob Lee who helped us discover this flaw.

/The AspectWerkz Team

[ avasseur ] 10:35, Friday, 3 December 2004

Our tutorial on AspectWerkz 2.x has been published on The Server Side.

In this tutorial, we are implementing a subset of the EJB 3 declarative transactions specification using AspectWerkz.

The aspect is written in plain Java with Java 5 annotations, and the sample application is running outside of any application server by using of ObjectWeb JOTM and we provide an easy way to use any JTA transaction manager.

@Aspect("perJVM")
public abstract class TransactionAttributeAwareTransactionProtocol {

    @Expression("execution(@javax.ejb.TransactionAttribute * *.*(..))")
    Pointcut transactedMethods;

    /**
     * Before advice that will initiate transaction management is bounded
	 		to the transactedMethods pointcut
     */
    @Before("transactedMethods")
    public void enterTransactedMethod(...) throws Throwable {
        ...
    }
}

To run the application, we are using Java 5 JVMTI ie you simply compile your applications and aspects with plain javac and run it with plain java.

Read more and practice.
Discuss the tutorial