• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Paul Clapham
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Roland Mueller
  • Piet Souris
Bartenders:

Interceptor - Excecution Order

 
Ranch Hand
Posts: 78
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 76
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic