Apply an Interceptor to a Field Execution
How do I apply an Interceptor to a field execution? To bind an interceptor to the access of a field, you must create an XML file. Open up jboss-aop.xml and take a look. Let's take a look at the first bindings. ... ... This bindings states that when POJO.var1 is accessed for a read, invoke the GetInterceptor. The next one is: ... ... Whenever the field POJO.var2 is written to, invoke the SetInterceptor. The next one is: ... ... Whenever any public static field in POJO is accessed for a read or a write, call the FieldInterceptor. The field expression matches both get/set of a field.