On Sun, Aug 24, 2003 at 10:50:38AM -0700, Jeremy Boynes wrote:
>
> Hmmm - thinking about it, that last bit seems to make more sense. It
> mirrors the distinction between 'normal' completion and a system
> exceptions as defined for EJBs; it makes the code for the interceptors
> simpler; it allows us to add meta-values to any normal completion and
> although we can't add them to system exceptions I don't think that's a
> big downside.
>
> So the CallbackInterceptor would then be
>
> try {
> Object result = callbackMethod.invoke(instance, callbackArgs);
> return new SimpleInvocationResult(result);
> } catch (InvocationTargetException e) {
> Throwable cause = e.getCause();
> if (cause instanceof Exception && !(cause instanceof
> RuntimeException)) {
> return new SimpleInvocationResult((Exception)cause));
> } else {
> throw cause;
> }
> }
>
> and the code David had above would work nicely.
>
> Any objections?
None at all. Go for it.
-David