O'Reilly logo

EJB 3.1 Cookbook by Richard M. Reese

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

Using deployment descriptors for interceptors

To specify interceptor methods of an interceptor class, we use the<interceptors> element with other elements in the ejb-jar.xml file. In this recipe, we examine how this is done. Interceptors are discussed in more detail in Chapter 8,

Java EE 6 application no longer requires deployment descriptors as annotations have largely taken their place. However, there are certain situations where they are still needed. One of these situations is when we want to use a default interceptor as detailed in the Using deployment descriptors for default interceptors recipe.

Getting ready

The steps to use deployment descriptors include:

  1. Adding an ejb-jar.xml file to your application
  2. Using the<interceptors> element to define ...

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