Using deployment descriptors for timer interceptors

The @AroundTimeout annotation is used to specify an interceptor method for a timer. The interceptor method will be executed before and after the timer method executes. The creation and use of timers is detailed in Chapter 9, Timer Services. In this recipe, we will learn how to specify a timer interceptor using a deployment descriptor.

Getting ready

The process for creating a deployment descriptor for a timer interceptor includes:

  1. Creating an ejb-jar.xml file for the EJB module
  2. Adding an<around-timeout> element to the file
  3. Deploying the application

    We will reuse the code developed in the Chapter 9, Using interceptors with timers recipe. In the recipe, the @Schedule annotation was used with the SystemReportManager's ...

Get EJB 3.1 Cookbook now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.