File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes EJB Certification (SCBCD/OCPJBCD) and the fly likes Query rgd interceptor invocation order Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Certification » EJB Certification (SCBCD/OCPJBCD)
Bookmark "Query rgd interceptor invocation order" Watch "Query rgd interceptor invocation order" New topic

Query rgd interceptor invocation order

Satya Maheshwari
Ranch Hand

Joined: Jan 01, 2007
Posts: 368
Quoting from EJB spec:
Default interceptors, if any, are invoked first. Default interceptors can only be specified in the deployment descriptor. Default interceptors are invoked in the order of their specification in the deployment descriptor

But practically when I tried it out, I saw class level interceptor being invoked first and then the default interceptor.Here is my default interceptor definition:

And I have put the class level interceptor through annotation:

Could anyone point me if I am missing something? :roll:

Thanks and Regards
Satya Maheshwari
Ranch Hand

Joined: Jan 01, 2007
Posts: 368
I think I figured out the problem. I my interceptor binding, I think I need to put the ejb-name to * in order to make the binding that of a default interceptor.

I agree. Here's the link:
subject: Query rgd interceptor invocation order
Similar Threads
Invocation Order of Interceptors
interceptors in the EJB 3.0 ejb-jar.xml
Life-Cycle Event Interceptor Method Skipped
Interceptors - more than 1 @AroundInvoke - Multiple @Interceptors declared for a class/method?
Business method interceptor methods (AroundInvoke methods) invocation order