Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Interceptor Order

 
Mark Garland
Ranch Hand
Posts: 226
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Reading "EJB3 In Action" pg 161, it says how "Somewhat counterintuitive to how Java scoping typically works, the interceptors are called from the larger scope to the smaller scope".

I just wondered why that was? What's the thinking behind this?
If anything, I'd probably want it the other way around?

Thanks,

MG
 
Remko Strating
Ranch Hand
Posts: 893
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I believe it is just intuitive. You first call the interceptors in the large scope and then you would go more specific into the smaller scope. In the smaller scope you could have more specific behaviour which could depend on the behaviour on the larger scope.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic