Apply an Interceptor to a Method Execution
To bind an interceptor to a method execution, you must create an XML file. Open up jboss-aop.xml and take a look. Let's first start by applying SimpleInterceptor.java to the POJO.noop() method. ... ... To apply the interceptor you must create a binding and a pointcut that specifies where in your Java code you want the interceptor applied. execution(method expression) defines whenever the method noop() is executed. A method expression requires a return type followed by a class expression followed by '->' followed by the method name followed by a list of parameters. You can optionally provide method attributes like 'public', 'static', etc. if so desired.