[jsr339-experts] AsyncResponse unmapped exception and CompletionCallback

From: Sergey Beryozkin <sberyozkin_at_talend.com>
Date: Fri, 8 Feb 2013 14:18:08 +0000

I've been experimenting with throwing unmapped exceptions via
AsyncResponse.resume(Throwable); and expecting to see a registered
CompletionCallback.onComplete(Throwable) be invoked in such cases, with
the runtime making sure the underlying javax.servler.AsyncListener
onComplete and onError callbacks delegating to

What I'm seeing is that CompletionCallback.onComplete(Throwable) is
indeed called in case of unmapped exceptions, but via
AsyncListener.onComplete path, and thus,
CompletionCallback.onComplete(Throwable) having a null Throwable.

What I'm not sure if it is the JAX-RS implementation problem or that of
the underlying javax.servlet.AsyncContext's implementation ?

In other words, how to get it call back AsyncListener.onError() ?

Thanks, Sergey