Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within OCEEJBD
Search Coderanch
Advance search
Google search
Register / Login
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
Ron McLeod
Paul Clapham
Tim Cooke
Devaka Cooray
Sheriffs:
Liutauras Vilda
paul wheaton
Rob Spoor
Saloon Keepers:
Tim Moores
Stephan van Hulst
Tim Holloway
Piet Souris
Mikalai Zaikin
Bartenders:
Carey Brown
Roland Mueller
Forum:
EJB Certification (OCEEJBD)
EJB Core spec 12.3.1 Multiple Business Method Interceptor Methods
Lee Kian Giap
Ranch Hand
Posts: 213
posted 14 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Confuse for the explanation of
EJB
Core spec 12.3.1 Multiple Business Method Interceptor Methods
My understanding is as follows: (numbered is the order of invocation)
(1) Default Interceptors (if >1 , follows DD order) (2) Class-level Interceptors (i.e. @Interceptor defined on bean class, means @Interceptor code written above the bean class declaration) (2a) @AroundInvoke method in Interceptor class (If Interceptor class has superclass(es), all @ArroundInvoke method of superclass(es) invoked, except those method overrided in Interceptor class. Overriding method in Interceptor class may/may not be an @AroundInvoke method) (2b) @AroundInvoke method in Bean class (If Bean class has superclass(es), all @ArroundInvoke method of superclass(es) invoked, except those method overrided in Bean class. Overriding method in Bean class may/may not be an @AroundInvoke method) (follows the order of @Interceptor) for example @Interceptor({interceptorclass1.class, interceptorclass2.class, beanclass1.class, interceptorclass3.class, beanclass2.class}) so the order is interceptorclass1.class -> interceptorclass2.class -> interceptorclass3.class -> beanclass1.class -> beanclass2.class (3) Method-level Interceptors (i.e. @Interceptor defined on bean class's method, means @Interceptor code written above the bean class's method declaration) (3a) @AroundInvoke method in Interceptor class (If Interceptor class has superclass(es), all @ArroundInvoke method of superclass(es) invoked, except those method overrided in Interceptor class. Overriding method in Interceptor class may/may not be an @AroundInvoke method) (3b) @AroundInvoke method in Bean class (If Bean class has superclass(es), all @ArroundInvoke method of superclass(es) invoked, except those method overrided in Bean class. Overriding method in Bean class may/may not be an @AroundInvoke method) (follows the order of @Interceptor) for example @Interceptor({interceptorclass1.class, interceptorclass2.class, beanclass1.class, interceptorclass3.class, beanclass2.class}) so the order is interceptorclass1.class -> interceptorclass2.class -> interceptorclass3.class -> beanclass1.class -> beanclass2.class
so the order is like this (1) --> (2a) --> (2b) --> (3a) --> (3b)
Please correct me if I was wrong , really confuse.
Thanks in advance !!!
SCJP 6, SCWCD 5, SCBCD 5
joke time: What is brown and sticky? ... ... ... A stick! Use it to beat this tiny ad!
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
Interceptors - more than 1 @AroundInvoke - Multiple @Interceptors declared for a class/method?
multiple AroundInvoke
EJB 3.0 Interceptors
Business method interceptor methods (AroundInvoke methods) invocation order
question about interceptor methods invocation order
More...