One of the advantages of EJBs is that they allow us to easily do Aspect Oriented Programming (AOP) via interceptors. CDI allows us to write Interceptor Binding Types, which let us bind interceptors to beans without having the beans depend directly on the interceptor. Interceptor Binding Types are annotations which themselves are annotated with
Creating an interceptor binding type in NetBeans consists of simply creating a new file, selecting the Contexts and Dependency Injection category, and the Interceptor Binding Type file type.
We then need to enter a class name and select or enter a package for ...