Java EE EJB Interceptors tutorial and example

In this tutorial you will learn how to configure EJB Interceptors used to – as the name states – intercept calls to EJB methods.

1. Introduction

Interceptors – as the name states – are components that intercepts calls to EJB methods. They may be used – for example – to implement an auditing / logging system around calls to EJB. Another usage example may be to check if the client is authorized to call a given EJB method. Interceptors may be configured to intercept specific EJB method calls or to intercept calls to any method from a given EJB.

We may also have multiple interceptors to intercept a single EJB method call – resembling a chain of Interceptors – each one being executed in a predefined sequence. In this tutorial we will see how to configure EJB Interceptors in detail.

This tutorial considers the following environment:


Source : http://www.javacodegeeks.com/2013/07/java-ee-ejb-interceptors-tutorial-and-example.html

Back to Top