JBoss.org Community Documentation

- Prev
- Next

### 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 :

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

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.

- Prev6.4. Annotation
- Top of page
- Front page
- Next6.4.2. JDK5.0 field level annotations