Interceptors
The Interceptors 1.2 Specification was developed under JSR 318. This section just gives you an overview of improvements in the API. The complete document specification (for more information) can be downloaded from http://jcp.org/aboutJava/communityprocess/final/jsr318/index.html.
Intercepting some processes
Interceptors are a Java mechanism that allows us to implement some concepts of AOP, in the sense that they give us the ability to separate the code from the crosscutting concerns such as logging, auditing, and security. Thus, due to this specification, we can intercept invocations of methods, lifecycle callback events, and timeout events.
Interceptors allow you to intercept method calls as well as the outbreak of some events. During the interception, you can access the method name, method parameters, and a lot of other information. That said, the interceptors can be used to manage cross cutting concerns such as logging, auditing, security (to ensure that a user has the right...