This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes EJB Certification (SCBCD/OCPJBCD) and the fly likes Invocation Order of Interceptors Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Certification » EJB Certification (SCBCD/OCPJBCD)
Bookmark "Invocation Order of Interceptors" Watch "Invocation Order of Interceptors" New topic
Author

Invocation Order of Interceptors

Treimin Clark
Ranch Hand

Joined: Nov 12, 2008
Posts: 757
According to WhizLabs, the invocation order of interceptors is:
Method-Level Interceptors --> Bean Interceptors.

But as I heard somewhere before, it should be:
Bean Interceptors --> Method-Level Interceptors .

Which one is the correct, please confirm.
Anish Mathur
Greenhorn

Joined: Jun 30, 2008
Posts: 9
Bean Interceptors --> Method-Level Interceptors
is the correct one.

Default interceptors are triggered first, then the class-level interceptors and finally the method-level interceptor.
Treimin Clark
Ranch Hand

Joined: Nov 12, 2008
Posts: 757
Thanks Anish.
 
Don't get me started about those stupid light bulbs.
 
subject: Invocation Order of Interceptors