Meaningless Drivel is fun!
The moose likes EJB Certification (SCBCD/OCPJBCD) and the fly likes Sequence of Interceptors Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Head First Android this week in the Android forum!
JavaRanch » Java Forums » Certification » EJB Certification (SCBCD/OCPJBCD)
Bookmark "Sequence of Interceptors" Watch "Sequence of Interceptors" New topic

Sequence of Interceptors

Anuj Singhal

Joined: Oct 17, 2003
Posts: 25
There are two interceptors defined for a given method; one at method level and one at class level.
What will be the sequence of execution?

public class MyBean ... {
public void someMethod() {
Frits Walraven
Creator of Enthuware JWS+ V6
Saloon Keeper

Joined: Apr 07, 2010
Posts: 1999

Hi Anuj,

The sequence is class level first, then method level.

There are more possibilities, please check my notes (chapter 4.1 order of interceptors)

It is sorta covered in the JavaRanch Style Guide.
subject: Sequence of Interceptors
It's not a secret anymore!