• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

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.
reply
    Bookmark Topic Watch Topic
  • New Topic