JBoss.org Community Documentation

6.3. Understanding the provided AOP descriptor

The advanced user might decide to alter the provided AOP descriptor. In order to do this, it is important to understand the reasons behind what is provided, and what is required by POJO Cache. Previous sections have mentioned that any class with the @Replicable annotation will be instrumented. This happens, because the provided AOP descriptor, pojocache-aop.xml , has a prepare statement which matches any class (or subclass) using the annotation. This is shown in the following snippet:

<prepare expr="field(* $instanceof{@org.jboss.cache.pojo.annotation.Replicable}->*)"/>
         

More specifically, any code which accesses a field on a class which has been annotated with @Replicable , will be instrumented: The "field" pointcut in the expression matches both read and write operations. The wildcard "*" indicates that all java protection modes are intercepted (private, package, protected, public). The $instanceof expression refers to any annotation that subclasses @Replicable . Finally, the ending wildcard allows the matched field to have any name.