I am experiencing a behavior difference between TC 4.0.6 and 4.1.12.
The code below processes a servlet response. In TC4.0.6 the client does
get the response message at the flush(). The sleep does not effect the delivery.
In TC 4.1.12, the output does not get delivered until after the code gets back into the area around:
org.apache.coyote.tomcat4.CoyoteAdapter.service(org.apache.coyote.Request, org.apache.coyote.Response) line: 226
Bottom line is the flush() has no effect on getting the data out of the stream.
The client is java code, however, I have reproduced the problem using this code chunk using
either mozilla or IE6 in place of the clients.
try {
logger.debug( "Release requestor" );
response.setContentType( "text/plain; charset=ISO-8859-1" );
PrintWriter out = response.getWriter();
out.println( "OK" );
out.flush();
out.close(); // client should get "OK" message at this time
logger.debug( "Release requestor - done" );
String readQueue = request.getParameter( "readQueue" );
logger.debug( "Sleeping" );
Thread.sleep(6000);
logger.debug( "awake" );
// Pull off parms passed and exec ReadCntl
} catch ( Exception e ) {
logger.error("Unexpected error", e);
}
--
To unsubscribe, e-mail: <mailto:tomcat-user-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-user-help@;jakarta.apache.org>
