Re: JSR311: ResponseBuilder

From: Marc Hadley <Marc.Hadley_at_Sun.COM>
Date: Tue, 02 Sep 2008 12:49:17 -0400

On Sep 2, 2008, at 12:14 PM, Stephan Koops wrote:
>> I don't really understand the concern. If an impl throws a custom
>> subclass and an application has an exception mapper for it then the
>> result is non-portable (obviously) but I don't see any other issue ?
> The idea for this results in my explanation before in this email. If
> I catch the runtime environment WebAppExc subclass for e.g 406 or
> 415, than the application provided exception mapper for the
> WebAppExc will not get this subclass exception, but the sense, that
> this exception must be handled as described in section 3.3.4 is,
> that this is possible.
The spec only talks about application-supplied exception mapping
providers, it doesn't require an implementation to use the same
mechanism to provide a default mapping. IOW, its OK for your impl to
provide a mapper for some subclass of WebApplicationException but
still use an application-supplied mapper for WebApplicationException
if one is provided even though the latter is less explicit.


Marc Hadley <marc.hadley at>
CTO Office, Sun Microsystems.