jsr340-experts@servlet-spec.java.net

[jsr340-experts] SERVLET_SPEC-6: Undefined behaviour for AsyncContext#getRequest() and getResponse() after timeout

From: Shing Wai Chan <shing.wai.chan_at_oracle.com>
Date: Tue, 30 Aug 2011 17:17:46 -0700

In http://java.net/jira/browse/SERVLET_SPEC-6, it would like to have a
clarification on the behavior of AsyncContext#getRequest() and
getResponse() after timeout.

I think with the comment that one should throw IllegalStateException in
those circumstances.
I have a question.

According to javadoc of AsyncContext, when there is async timeout, the
following may be invoked:
a. invoke AsyncListener#onTimeout
b. AsyncContext#complete, AsyncListener#onComplete
c. AsyncContext#dispatch

In (a), (b) and (c) above, should we throw IllegalStateException?
I think it should not at least for (a).

Any comments?
     Shing Wai Chan