jsr340-experts@servlet-spec.java.net

[jsr340-experts] A question on ServletRequestListener#requestDestroyed

From: Shing Wai Chan <shing.wai.chan_at_oracle.com>
Date: Mon, 12 Dec 2011 15:02:48 -0800

I have a question on ServletRequestListener#requestDestroyed

In javadoc javax.servlet.ServletRequestListener#requestDestroyed, we have
" Receives notification that a ServletRequest is about to go out of
scope of the web application."

Suppose we have a servlet A which has startAsync.
(i) One one hand, servlet A will continue to the end of
javax.servlet.Servlet#service.
(ii) On the other hand, the async request will continue processing.

When will ServletRequestListener#requestDestroyed invoked in this case?
Is it after (i)? Or after (ii)? Or wait until both (i) and (ii) are done.

Shing Wai Chan