O'Reilly logo

Java EE 6 Development with NetBeans 7 by David R. Heffelfinger

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Interceptor Binding Types

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 @InterceptorBinding.

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.

Interceptor Binding Types

We then need to enter a class name and select or enter a package for ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required