JBoss.org Community Documentation

6.4.1. POJO annotation for instrumentation

To support annotation (in order to simplify user's development effort), the JBoss Cache distribution ships with a pojocache-aop.xml under the resources directory. For reference, here is annotation definition from pojocache-aop.xml again :

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

Basically, it simply states that any annotation with both marker interfaces will be "aspectized" accordingly.

Here is a code snippet that illustrate the declaration:

@org.jboss.cache.pojo.annotation.Replicable public class
Person {...}
The above declaration will instrument the class Person and all of its sub-classes. That is, if Student sub-class from Personal , then it will get instrumented automatically without further annotation declaration.