This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes EJB Certification (SCBCD/OCPJBCD) and the fly likes EJB 3.0 Interceptors Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Certification » EJB Certification (SCBCD/OCPJBCD)
Bookmark "EJB 3.0 Interceptors" Watch "EJB 3.0 Interceptors" New topic
Author

EJB 3.0 Interceptors

K Hein
Greenhorn

Joined: Jul 02, 2008
Posts: 11
Hi everyone,

I have some doubts regarding EJB 3.0 Interceptors.

First, according to the EJB 3.0 Core specification, lifecycle call back methods can only throw System Exception. How about @AroundInvoke Interceptor methods? Can a method with @AroundInvoke throw Application Exception?

Second, I don't quite understand the below statement from EJB 3.0 specification.

The deployment descriptor may be used to augment the interceptors and interceptor
methods defined by means of annotations. When the deployment descriptor is used to augment
the interceptors specified in annotations, the interceptor methods specified in the deployment descriptor
will be invoked after those specified in annotations, according to the ordering specified in sections
12.3.1 and 12.4.1.


Does it mean that interceptors specified in the deployment descriptor are always invoked after the interceptors defined by annotations?

Thanks in advance.

Regards,

Kyi Hein
amit punekar
Ranch Hand

Joined: May 14, 2004
Posts: 511
Hi there,

Does it mean that interceptors specified in the deployment descriptor are always invoked after the interceptors defined by annotations?


Right, that's correct.

Regarding @AroundInvoke, if we are intercepting the business method then we can throw ApplicationException like Business methods.

Regards,
Amit
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: EJB 3.0 Interceptors
 
Similar Threads
Business method interceptor methods (AroundInvoke methods) invocation order
question about interceptor methods invocation order
doubt in Mikalai notes in overiding deployment descriptor
Query rgd interceptor invocation order
Doubts - EJB 3.0