bin/
scripts since it is only required for Java 1.3 or JRockit (see FAQ, especially for use with WebLogic)
hasmethod
and
hasfield
pointcuts (contributed by Michael Nascimento Santos)
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.
aop.xml
Aspect defintion/deployment files alongside deployed
application (
WEB-INF/aop.xml
,
META-INF/aop.xml
) and have them following
the classloader hierarchy.
within
and
withincode
pointcuts
cflow
pointcuts that can take any pointcut
expression as "parameter" and can be used to build arbitrary nested expressions.
!public
and
NOT static
etc.)
-javaagent:
AspectC
has been replaced by
AnnontationC
and has slightly different options, so to compile the aspects use
AnnotationC
from now on.
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.
JoinPoint
compilation is now thread safe.
serialVersionUID
computation fixed.
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.
In this release is mainly a bug-fix release, but we have added some new functionality (and changed some APIs) as well:
Aspect
base class anymore, but
can be any Java class and extend anything they like.
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.
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.
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:
We have improved the expressiveness and orthogonality a lot.
AspectWerkz currently supports the following join points:
In the latest version we have reached a high level of orthogonality:
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 |
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.
system
element and deprecated syntax from 0.8.x has been removed
bin/aspectwerkz -offline
must now
be invocated with the definition file as first argument.)
___AW_
is now used at all introduced methods and fields.
Including the
Identifiable.getUuid
method which is renamed to
___AW_getUuid
((pc1 OR pc2) AND !pc3)
and similar).