jsr369-experts@servlet-spec.java.net

[jsr369-experts] Re: [servlet-spec users] Re: Re: Clarify onAllDataRead ?

From: Mark Thomas <markt_at_apache.org>
Date: Wed, 04 Feb 2015 09:21:07 +0000

On 04/02/2015 07:42, Greg Wilkins wrote:
>
> All,
>
> Another related concern is what should happen with async IO callbacks if
> AsyncContext.complete() has been called?
>
>
> Let's say that both input.isReady() and out.isReady() have returned
> false, so that we have a pending callback to both onDataAvailable() and
> onWritePossible().
>
> If during the first of these callbacks (say onDataAvailable()), the
> AsyncContext.complete() method is called, then should the application
> expect onWritePossible() to be called afterwards?

That seems wrong to me.

> Ie can we keep calling IO callbacks after the lifecycle of the
> request/response is complete?

I'm leaning towards "no".

Mark