File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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
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: 2092

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)

I agree. Here's the link:
subject: Sequence of Interceptors
It's not a secret anymore!