Bug 50207 - CometProcessor async timeout events are not being fired
CometProcessor async timeout events are not being fired
Status: RESOLVED FIXED
Product: Tomcat 7
Classification: Unclassified
Component: Connectors
7.0.4
Macintosh All
: P2 regression with 1 vote (vote)
: ---
Assigned To: Tomcat Developers Mailing List
:
Depends on:
Blocks:
  Show dependency tree
 
Reported: 2010-11-03 14:52 UTC by Jeremy Norris
Modified: 2010-11-23 11:59 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.