dev@jsr311.java.net

Re: JSR311: EJBException handling spec error

From: Paul Sandoz <Paul.Sandoz_at_oracle.com>
Date: Wed, 20 Oct 2010 10:29:10 +0200

H Bill,

First, please accept my sincere apologies for not replying, it was an
email management SNAFU on my part. Next time please, metaphorically,
poke me in the ribs, with a direct email if i do not reply in a timely
fashion!

I agree with your analysis and have logged an issue so we don't forget
about it.

   https://jsr311.dev.java.net/issues/show_bug.cgi?id=105

Paul.

On Jul 6, 2010, at 3:39 PM, Bill Burke wrote:

> The spec says: "If an ExceptionMapper for EJBException or subclass
> is not included with an appliction, then exceptions thrown by an EJB
> resource class or provider method MUST be treated as an EJB
> application exception..."
>
> An "application exception" in EJB means that the thrown exception
> will not automatically cause a rollback and should be propagated as-
> is. Following this JAX-RS/EJBException logic to the letter of the
> law would make it impossible for EJB applications to throw
> exceptions that cause transaction rollbacks.
>
> The EJB container wraps unchecked (non applicaton) exceptions within
> EJBException. Unchecked exceptions are required by the EJB
> specification to trigger a rollback unless they are annotated with
> @ApplicationException or ejb-jar.xml equivalent.
>
> The spec should instead just say:
>
> "If an ExceptionMapper for EJBException or subclass is not included
> with an appliction, then EJBException thrown by an EJB resource
> class or provider method MUST be unwrapped and processed as
> described in section 3.3.4"
>
> --
> Bill Burke
> JBoss, a division of Red Hat
> http://bill.burkecentral.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe_at_jsr311.dev.java.net
> For additional commands, e-mail: dev-help_at_jsr311.dev.java.net
>