On 06/05/2013 13:52, Rossen Stoyanchev wrote:
> If using the response results in an exception during async processing
> (e.g. client dropped the connection) what, if any, error processing
> (e.g. notify registered AsyncListener's) is expected on:
>
> (a) container threads - after startAsync but before the container thread
> is returned
> (b) non-container threads - before a dispatch
The Servlet spec (v3.1, section 2.3.3.3) only talks about the
AsyncListener.onError() being called if an error happens during
execution of dispatch() methods.
Based on this, I'd say the answer to questions a) and b) is that no
notification to the AsyncListener is expected. This seems logical since
the app already knows about the error as it happened in application code
(unlike an error during dispatch which might otherwise go unnoticed by
the app).
> What options does the application have to complete async processing? Can
> asyncContext.complete() be called or is it it necessary to dispatch?
I think complete() should work here. (I know it currently doesn't in
Tomcat.) If there aren't any objections / comments from the other EG
members then this can be added as a clarification to the 3.1 maintenance
release.
Mark