[jax-rs-spec users] [jsr339-experts] Re: Re: AsyncResponse should be able to accept responses immediately

From: Marek Potociar <>
Date: Mon, 1 Oct 2012 13:29:51 -0700

On Oct 1, 2012, at 4:30 AM, Sergey Beryozkin <> wrote:

>> Regarding returning boolean vs throwing an exception.
>> I think it does not make a difference.
>> This is because the runtime effectively guarantees that the application
>> level code (original resource method accepting AsyncResponse or
>> TimeoutHandler) does always see a 'suspended' AsyncResponse.
>> However, after saying the above, I guess returning 'boolean' and
>> updating the docs to simply say that say "resume(...) -> Resumes the
>> suspended invocation, timeout(...) -> extends the suspended invocation,
>> cancel(...) - cancels the suspended invocation" would probably be the
>> right thing to do
> After checking
> I think I favor IllegalStateException, the way things are done now, because attempting to resume/cancel/timeout in the callback is an exception...

That is an orthogonal use case...

> Cheers, Sergey