jsr339-experts@jax-rs-spec.java.net

[jsr339-experts] Re: resume(Throwable) question

From: Marek Potociar <marek.potociar_at_oracle.com>
Date: Tue, 5 Feb 2013 17:43:14 +0100

The return value only indicates that the AsyncResponse was in a resumable state and the resume processing was able to proceed.

So, the answer to your question is that the resume should return true even for unmapped exceptions.

Marek

On Feb 5, 2013, at 2:37 PM, Bill Burke <bburke_at_redhat.com> wrote:

> Javadoc says for AsyncResponse.resume(Throwable)
>
> * For the provided throwable same rules apply as for an exception thrown
> * by a {_at_link javax.ws.rs.HttpMethod JAX-RS resource method}.
> * The processing of the throwable by JAX-RS framework follows the same path
> * as it would for any exception thrown by a JAX-RS resource method.
>
>
> So, if the Throwable is a WebApplicationException, or there is a mapper, then resume can send a response. If neither of those conditions are met, then return false?
>
> --
> Bill Burke
> JBoss, a division of Red Hat
> http://bill.burkecentral.com