Bug 50207

Summary: CometProcessor async timeout events are not being fired
Product: Tomcat 7 Reporter: Jeremy Norris <jnorris10>
Component: ConnectorsAssignee: Tomcat Developers Mailing List <dev>
Status: RESOLVED FIXED    
Severity: regression    
Priority: P2    
Version: 7.0.4   
Target Milestone: ---   
Hardware: Macintosh   
OS: All   

Description Jeremy Norris 2010-11-03 14:52:32 UTC
This is reproducible using the the default chat example (ie: ChatServlet, /examples/jsp/chat) and the following additional changes:

1) Enabled Http11Nio in conf/server.xml:

    <Connector 
        address="0.0.0.0" 
        port="8080" 
        protocol="org.apache.coyote.http11.Http11NioProtocol"
        connectionTimeout="20000" 
        enableLookups="false"
        acceptCount="100"
        disableUploadTimeout="true"
        maxThreads="15"
        minSpareThreads="15"
        maxSpareThreads="15"
        RECYCLE_FACADES="true"/>

2) Enabled the comet valve in conf/context.xml:

  <Valve className="org.apache.catalina.valves.CometConnectionManagerValve" />

The problem is CometEvent.EventType.ERROR (and subtype TIMEOUT) and CometEvent.EventType.END are never being fired.

This can be confirmed in the logs; the messages for these events are never printed.  This worked on Tomcat 6.0.29.

As an aside, what is the most complete/robust way to do async IO in tomcat 7 today, Servlet 3.0 or CometProcessor?
Comment 1 Jeremy Norris 2010-11-05 12:27:36 UTC
Note: timeouts are fired correctly (Tomcat 7.0.4) when the servlet 3.0 API is used instead (ie: javax.servlet.AsyncListener.onTimeout()).
Comment 2 Mark Thomas 2010-11-23 11:59:24 UTC
Thanks for the report.

This has been fixed in 7.0.x and will be included in 7.0.5 onwards.