Revert Keep-Alive patch.
authormturk <mturk@13f79535-47bb-0310-9956-ffa450edef68>
Fri, 29 Sep 2006 14:58:32 +0000 (14:58 +0000)
committermturk <mturk@13f79535-47bb-0310-9956-ffa450edef68>
Fri, 29 Sep 2006 14:58:32 +0000 (14:58 +0000)
git-svn-id: https://svn.apache.org/repos/asf/tomcat/tc6.0.x/trunk@451318 13f79535-47bb-0310-9956-ffa450edef68

java/org/apache/catalina/connector/mbeans-descriptors.xml
java/org/apache/catalina/startup/ContextConfig.java
java/org/apache/coyote/ajp/AjpAprProtocol.java
java/org/apache/coyote/http11/Http11AprProcessor.java
java/org/apache/coyote/http11/Http11AprProtocol.java
java/org/apache/coyote/http11/Http11Processor.java
java/org/apache/coyote/http11/Http11Protocol.java
java/org/apache/jasper/compiler/Generator.java
java/org/apache/tomcat/util/net/AprEndpoint.java

index 58ba947..5651d53 100644 (file)
           description="Maximum number of Keep-Alive requests to honor per connection"
                  type="int"/>
 
-    <attribute   name="keepAliveTimeout"
-          description="The number of seconds Tomcat will wait for a subsequent request before closing the connection"
-                 type="int"/>
-
     <attribute   name="maxPostSize"
           description="Maximum size in bytes of a POST which will be handled by the servlet API provided features"
                  type="int"/>
index f9145bb..f9ec106 100644 (file)
@@ -616,7 +616,6 @@ public class ContextConfig
                 source =
                     new InputSource("file://" + file.getAbsolutePath());
                 stream = new FileInputStream(file);
-                context.addWatchedResource(file.getAbsolutePath());
             }
         } catch (Exception e) {
             log.error(sm.getString("contextConfig.defaultMissing") 
index 6a10a1d..9a3f038 100644 (file)
@@ -68,7 +68,6 @@ public class AjpAprProtocol
         cHandler = new AjpConnectionHandler(this);
         setSoLinger(Constants.DEFAULT_CONNECTION_LINGER);
         setSoTimeout(Constants.DEFAULT_CONNECTION_TIMEOUT);
-        setKeepAliveTimeout(Constants.DEFAULT_CONNECTION_TIMEOUT);
         //setServerSoTimeout(Constants.DEFAULT_SERVER_SOCKET_TIMEOUT);
         setTcpNoDelay(Constants.DEFAULT_TCP_NO_DELAY);
     }
@@ -418,15 +417,6 @@ public class AjpAprProtocol
         setAttribute("soTimeout", "" + i);
     }
 
-    public int getKeepAliveTimeout() {
-        return ep.getKeepAliveTimeout();
-    }
-
-
-    public void setKeepAliveTimeout( int i ) {
-        ep.setKeepAliveTimeout(i);
-        setAttribute("keepAliveTimeout", "" + i);
-    }
     
     public void setRequiredSecret(String requiredSecret) {
         this.requiredSecret = requiredSecret;
index e0c8588..3b3daf4 100644 (file)
@@ -208,6 +208,7 @@ public class Http11AprProcessor implements ActionHook {
      */
     protected int maxKeepAliveRequests = -1;
 
+
     /**
      * SSL enabled ?
      */
@@ -642,6 +643,7 @@ public class Http11AprProcessor implements ActionHook {
         return maxKeepAliveRequests;
     }
 
+
     /**
      * Set the maximum size of a POST which will be buffered in SSL mode.
      */
index 960b7a5..fd27184 100644 (file)
@@ -54,7 +54,6 @@ public class Http11AprProtocol implements ProtocolHandler, MBeanRegistration
         cHandler = new Http11ConnectionHandler( this );
         setSoLinger(Constants.DEFAULT_CONNECTION_LINGER);
         setSoTimeout(Constants.DEFAULT_CONNECTION_TIMEOUT);
-        setKeepAliveTimeout(Constants.DEFAULT_CONNECTION_TIMEOUT);
         //setServerSoTimeout(Constants.DEFAULT_SERVER_SOCKET_TIMEOUT);
         setTcpNoDelay(Constants.DEFAULT_TCP_NO_DELAY);
     }
@@ -464,19 +463,6 @@ public class Http11AprProtocol implements ProtocolHandler, MBeanRegistration
     }
 
     /**
-     * The number of seconds Tomcat will wait for a subsequent request
-     * before closing the connection. The default is the same as for
-     * Apache HTTP Server (15 000 milliseconds).
-     */
-    public int getKeepAliveTimeout() {
-        return ep.getKeepAliveTimeout();
-    }
-
-    public void setKeepAliveTimeout(int timeout) {
-        ep.setKeepAliveTimeout(timeout);
-    }
-
-    /**
      * Return the Keep-Alive policy for the connection.
      */
     public boolean getKeepAlive() {
index a5fc68a..58c8230 100644 (file)
@@ -620,6 +620,7 @@ public class Http11Processor implements ActionHook {
         return maxKeepAliveRequests;
     }
 
+
     /**
      * Set the maximum size of a POST which will be buffered in SSL mode.
      */
index 9483c81..a1a92ab 100644 (file)
@@ -281,6 +281,7 @@ public class Http11Protocol
     public int getMaxKeepAliveRequests() { return maxKeepAliveRequests; }
     public void setMaxKeepAliveRequests(int mkar) { maxKeepAliveRequests = mkar; }
 
+
     // HTTP
     /**
      * This timeout represents the socket timeout which will be used while
index 537bd72..bb20079 100644 (file)
@@ -3276,7 +3276,7 @@ class Generator {
         out.printil("out = _jspx_out;");
         out.printil("if (out != null && out.getBufferSize() != 0)");
         out.pushIndent();
-        out.printil("try { out.clearBuffer(); } catch (java.io.IOException e) {}");
+        out.printil("out.clearBuffer();");
         out.popIndent();
 
         out
index 08dca2d..617f9a0 100644 (file)
@@ -257,14 +257,6 @@ public class AprEndpoint {
 
 
     /**
-     * Keep-Alive timeout.
-     */
-    protected int keepAliveTimeout = -1;
-    public int getKeepAliveTimeout() { return keepAliveTimeout; }
-    public void setKeepAliveTimeout(int timeout) { keepAliveTimeout = timeout; }
-
-
-    /**
      * Timeout on first request read before going to the poller, in ms.
      */
     protected int firstReadTimeout = -1;
@@ -1156,11 +1148,11 @@ public class AprEndpoint {
         protected void init() {
             pool = Pool.create(serverSockPool);
             int size = pollerSize / pollerThreadCount;
-            int timeout = keepAliveTimeout;
+            int timeout = soTimeout;
             if (comet) {
                 // FIXME: Find an appropriate timeout value, for now, "longer than usual"
                 // semms appropriate
-                timeout = keepAliveTimeout * 50;
+                timeout = soTimeout * 50;
             }
             serverPollset = allocatePoller(size, pool, timeout);
             if (serverPollset == 0 && size > 1024) {