Re: Returning CompletionStage from the resource method
ad 1) the response processing will be done on the caller (completer) thread (so, completionStage#whenComplete(..), not #whenCompleteAsync(..)), simply because it works in a same way as when using AsyncResponse.
ad 2) good idea. I'm not sure whether we'll be able to do that now, but could you please file an issue? https://github.com/jax-rs/api/issues
On 21/05/2017 13:47, Sergey Beryozkin wrote: