Return-Path: Delivered-To: apmail-incubator-geronimo-dev-archive@incubator.apache.org Received: (qmail 50731 invoked by uid 500); 24 Aug 2003 22:04:13 -0000 Mailing-List: contact geronimo-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: list-post: Reply-To: geronimo-dev@incubator.apache.org Delivered-To: mailing list geronimo-dev@incubator.apache.org Received: (qmail 50709 invoked from network); 24 Aug 2003 22:04:12 -0000 Received: from adsl-209-233-18-245.dsl.snfc21.pacbell.net (HELO public.coredevelopers.net) (209.233.18.245) by daedalus.apache.org with SMTP; 24 Aug 2003 22:04:12 -0000 Received: from coredevelopers.net (dsundstrom-host236.dsl.visi.com [208.42.65.236]) (using TLSv1 with cipher DES-CBC3-SHA (168/168 bits)) (No client certificate requested) by public.coredevelopers.net (Postfix on SuSE Linux 8.0 (i386)) with ESMTP id A70F1E148 for ; Sun, 24 Aug 2003 14:01:00 -0700 (PDT) Date: Sun, 24 Aug 2003 16:07:29 -0500 Subject: Re: InvocationResult Content-Type: text/plain; charset=US-ASCII; format=flowed Mime-Version: 1.0 (Apple Message framework v552) From: Dain Sundstrom To: geronimo-dev@incubator.apache.org Content-Transfer-Encoding: 7bit In-Reply-To: <000701c36a68$3ad7cc70$b625a8c0@ABU> Message-Id: X-Mailer: Apple Mail (2.552) X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N On Sunday, August 24, 2003, at 12:50 PM, 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? No. I have completely flip flopped on this issue. After yet another read of the exception chapter from the EJB specification, it is clear that to the container an application exception is an normal okay result from an EJB. The spec treats application exceptions exactly like a normal method return, so I think packing the application exception in the invocation response object is the right thing to do. -dain ************************* * Dain Sundstrom * Partner * Core Developers Network *************************/