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

From: Sergey Beryozkin <>
Date: Thu, 27 Sep 2012 13:56:27 +0100


I can see AsyncResponse.resume throws IllegalStateException if the
invocation has not been suspended.

IMHO it is too much of a restriction, possibly an implementation
specific one.

IMHO, the following should work

void getIt(AsyncResponse response) {

if 'myObject' happens to be available immediately.
The runtime has to suspend only after "getIt" returns, but only if no
response object is already available.

Thoughts ?