Affects Version/s: None
Fix Version/s: 1.2
Currently the rules are interceptor signatures for callbacks are not allowed to return Object or throw Exception. Blogged about it here: http://blog.dblevins.com/2010/09/ejbnext-interceptor-improvements-method.html
We chose that altered method signature because it effectively matched the method signature of the callback itself, but it has some terrible consequences. The worst is that InvocationContext.proceed() method signature is always the same:
When the Interceptor isn't allowed to have the same method signature it creates awkward and unfortunately unavoidable boiler plate:
Requiring each interceptor to catch and handle the 'throws Exception' from the InvocationContext.proceed() call is unfortunate. The interceptor should be allowed to let any exceptions propagate.
We should update the spec rules so that interceptor method signatures for callbacks are allowed to be the same and let the container handle the possible undeclared exception issues rather than force that upon the application code in every single callback interceptor they create.