Articles Tagged ‘interceptor’

Java EE: Logging User Interaction the Aspect-Oriented Way using Interceptors

Monday, May 26th, 2014

Using dependency injection and aspect-oriented mechanisms like interceptors allow us to separate cross-cutting-concerns in our Java enterprise application, to control global aspects of our application and to avoid boilerplate code.

In the following short tutorial we’re going to create an aspect-oriented logger to protocol the initiating user, class and method called and the parameters passed to the method and finally we’re adding this interceptor to a sample RESTful web-service by adding a simple annotation.

(more…)

Java EE 6, GlassFish and the Interceptor API

Wednesday, August 17th, 2011

Aspect oriented programming and the definition of cross-cutting-concerns is made easy in Java EE 6 using interceptors.

In the following tutorial we’re going to take a look at the different possibilities to apply interceptors to your EJBs at class or method level and how to setup a GlassFish instance to run the examples.

(more…)

Search
Categories