This week's book giveaway is in the Java 8 forum.
We're giving away four copies of Java 8 in Action and have Raoul-Gabriel Urma, Mario Fusco, and Alan Mycroft on-line!
See this thread for details.
The moose likes EJB Certification (SCBCD/OCPJBCD) and the fly likes @AroundInvoke interceptor method without throws clause Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Certification » EJB Certification (SCBCD/OCPJBCD)
Bookmark "@AroundInvoke interceptor method without throws clause" Watch "@AroundInvoke interceptor method without throws clause" New topic
Author

@AroundInvoke interceptor method without throws clause

Daniel Stankiewicz
Greenhorn

Joined: Oct 03, 2007
Posts: 8
For me specification is not clear in that case. Can interceptor method have signature:



that is without any throws clause in case it doesn't throw any exceptions and either not invoke ic.proceed() or catches any Exception thrown by proceed() method?

Weblogic 12 doesn't even deploy such intercepted EJB.
Frits Walraven
Creator of Enthuware JWS+ V6
Bartender

Joined: Apr 07, 2010
Posts: 1529
    
  22

Hi Daniel,

Can interceptor method have signature that is without any throws clause

No, that is not possible.

The Interceptors 1.1 specification is part of the EJB3.1 specification and they clearly define an AroundInvoke method as:
java wrote:
Around-invoke methods have the following signature:
Object <METHOD>(InvocationContext) throws Exception

Regards,
Frits
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: @AroundInvoke interceptor method without throws clause
 
Similar Threads
Multiple @AroundInvokes
Doubts - EJB 3.0
Which of the above two interfaces would be invoked?
mock question about interceptor of EJB3.0
Business method interceptor methods (AroundInvoke methods) invocation order