users@servlet-spec.java.net

[servlet-spec users] Question about ServletOutputStream.setWriteListener

From: <violetagg_at_abv.bg>
Date: Thu, 27 Oct 2016 13:32:48 +0000 (UTC)

Hi,

I would like to ask for a clarification about
ServletOutputStream.setWriteListener.
In the specification it is not clear when it is allowed to invoke this
method.
Should the application go to a non blocking mode right after
AsyncContect.startAsync while in the container thread or that call can
be delayed and made from a different thread.
In Tomcat we allowed a delayed call to this method however we have
edged use cases [1] and [2] when this causes problems.
The same question applies also for ServletInputStream.setReadListener.

Thanks in advance,
Violeta Georgieva

[1] http://marc.info/?t=147756348200005&r=1&w=2
[2] http://marc.info/?t=147696900800002&r=1&w=2