JBoss.org Community Documentation

6.7.1. @Prepare POJO

You can also annotate a POJO with @Prepare directly in cases where you are using Dynamic AOP, and the exact bindings are not known at instrumentation time. In this case you annotate the class itself. Here's how it is done:

   package com.mypackage;

   import org.jboss.aop.Prepare;

   @Prepare ("all(this)")
   public class MyDynamicPOJO implements Interceptor
   {
      ...
   }
           

all(this) means the same as all(com.blah.MyDynamicPOJO), but the use of all(this) is recommended.

The examples just given equate to this XML

            <prepare expr="all(com.blah.MyDynamicPOJO)"/>