• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Interceptor - Excecution Order

 
Ashwin Kumar
Ranch Hand
Posts: 78
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
As per the specs the Invocation order is Default > Class > Method

What should be order if the super class has @AroundInvoke method, and when the subclass method is called ?



Which is correct when "amethod" is invoked and Why ?

Option 1 > test1 > test2

Option 2 > test2 > test1
 
Aditya Vasudeva
Ranch Hand
Posts: 76
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Shonak,

the correct answer is Option2 > test2 test1

when you inherit a class which has @AroundInvoke, it is intercepted first and then the subclass continues.
Option 1 is not a valid answer.

If you have not understood, click on this link :
http://docs.jboss.org/ejb3/app-server/tutorial/interceptor/interceptor.html
and see Inheritance Ordering.

Keep Programming.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic