Win a copy of Java Mock Exams (software) this week in the Programmer Certification (OCPJP) forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

@AroundInvoke interceptor method without throws clause

 
Daniel Stankiewicz
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Saloon Keeper
Posts: 2777
172
Android Chrome Eclipse IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
What are you doing? You are supposed to be reading this tiny ad!
the new thread boost feature brings a LOT of attention to your favorite threads
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!