jsr345-experts@ejb-spec.java.net

[jsr345-experts] Adding an option to use the same method signature for all interceptor methods of an interceptor class (INTERCEPTORS_SPEC-10)

From: Marina Vatkina <marina.vatkina_at_oracle.com>
Date: Wed, 13 Feb 2013 18:33:16 -0800

Unless I hear serious objections, I plan to accept JIRA
http://java.net/jira/browse/INTERCEPTORS_SPEC-10 and allow lifecycle
callback methods declared on an interceptor class to have either of the
following signatures:

(a) void <METHOD>(InvocationContext)

or

(b) Object <METHOD>(InvocationContext) throws Exception

Which will allow to eliminate try-catch blocks that do nothing besides
wrapping an Exception from ctx.proceed() method.

This won't be a drastic change as the around-timeout method has the (b)
signature with the interposed method being void without any checked
exceptions (there is no client).

I'll add a note explaining why (b) is available.

As the method on the bean class itself doesn't need to call
ctx.proceed(), the rules for it will not change.

Best,
-marina