Win a copy of Java 9 Revealed this week in the Features new in Java 9 forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Invocation Order of Interceptors  RSS feed

 
Treimin Clark
Ranch Hand
Posts: 757
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 757
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Anish.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!