Author: remy.maucherat(a)jboss.com
Date: 2012-11-27 07:53:37 -0500 (Tue, 27 Nov 2012)
New Revision: 2134
Modified:
branches/7.0.x/java/org/apache/coyote/http11/Constants.java
branches/7.0.x/java/org/apache/coyote/http11/Http11AprProtocol.java
branches/7.0.x/java/org/apache/coyote/http11/Http11Protocol.java
branches/7.0.x/webapps/docs/sysprops.xml
branches/7.2.x/src/main/java/org/apache/coyote/http11/Constants.java
branches/7.2.x/src/main/java/org/apache/coyote/http11/Http11AprProtocol.java
branches/7.2.x/src/main/java/org/apache/coyote/http11/Http11NioProtocol.java
branches/7.2.x/src/main/java/org/apache/coyote/http11/Http11Protocol.java
branches/7.2.x/webapps/docs/sysprops.xml
Log:
Clarify the two socket timeouts used, and add a system property for the keepalive one.
Modified: branches/7.0.x/java/org/apache/coyote/http11/Constants.java
===================================================================
--- branches/7.0.x/java/org/apache/coyote/http11/Constants.java 2012-11-23 15:03:32 UTC
(rev 2133)
+++ branches/7.0.x/java/org/apache/coyote/http11/Constants.java 2012-11-27 12:53:37 UTC
(rev 2134)
@@ -39,6 +39,8 @@
public static final int DEFAULT_CONNECTION_LINGER = -1;
public static final int DEFAULT_CONNECTION_TIMEOUT =
Integer.valueOf(System.getProperty("org.apache.coyote.http11.DEFAULT_CONNECTION_TIMEOUT",
"60000")).intValue();
+ public static final int DEFAULT_KEEP_ALIVE_TIMEOUT =
+
Integer.valueOf(System.getProperty("org.apache.coyote.http11.DEFAULT_KEEP_ALIVE_TIMEOUT",
"-1")).intValue();
public static final int DEFAULT_CONNECTION_UPLOAD_TIMEOUT = 300000;
public static final int DEFAULT_SERVER_SOCKET_TIMEOUT = 0;
public static final boolean DEFAULT_TCP_NO_DELAY = true;
Modified: branches/7.0.x/java/org/apache/coyote/http11/Http11AprProtocol.java
===================================================================
--- branches/7.0.x/java/org/apache/coyote/http11/Http11AprProtocol.java 2012-11-23
15:03:32 UTC (rev 2133)
+++ branches/7.0.x/java/org/apache/coyote/http11/Http11AprProtocol.java 2012-11-27
12:53:37 UTC (rev 2134)
@@ -71,6 +71,7 @@
setSoTimeout(Constants.DEFAULT_CONNECTION_TIMEOUT);
//setServerSoTimeout(Constants.DEFAULT_SERVER_SOCKET_TIMEOUT);
setTcpNoDelay(Constants.DEFAULT_TCP_NO_DELAY);
+ setKeepAliveTimeout(Constants.DEFAULT_KEEP_ALIVE_TIMEOUT);
}
/** Pass config info
Modified: branches/7.0.x/java/org/apache/coyote/http11/Http11Protocol.java
===================================================================
--- branches/7.0.x/java/org/apache/coyote/http11/Http11Protocol.java 2012-11-23 15:03:32
UTC (rev 2133)
+++ branches/7.0.x/java/org/apache/coyote/http11/Http11Protocol.java 2012-11-27 12:53:37
UTC (rev 2134)
@@ -81,6 +81,7 @@
setSoTimeout(Constants.DEFAULT_CONNECTION_TIMEOUT);
//setServerSoTimeout(Constants.DEFAULT_SERVER_SOCKET_TIMEOUT);
setTcpNoDelay(Constants.DEFAULT_TCP_NO_DELAY);
+ setKeepAliveTimeout(Constants.DEFAULT_KEEP_ALIVE_TIMEOUT);
}
Modified: branches/7.0.x/webapps/docs/sysprops.xml
===================================================================
--- branches/7.0.x/webapps/docs/sysprops.xml 2012-11-23 15:03:32 UTC (rev 2133)
+++ branches/7.0.x/webapps/docs/sysprops.xml 2012-11-27 12:53:37 UTC (rev 2134)
@@ -174,6 +174,15 @@
web server. The default value is <code>true</code>.</p>
</property>
+ <property
name="org.apache.coyote.http11.DEFAULT_CONNECTION_TIMEOUT">
+ <p>Default socket timeout. The default value is
<code>60000</code> ms.</p>
+ </property>
+
+ <property
name="org.apache.coyote.http11.DEFAULT_KEEP_ALIVE_TIMEOUT">
+ <p>Default socket timeout for keep alive. The default value is
<code>-1</code> ms,
+ which means it will use the default socket timeout.</p>
+ </property>
+
</properties>
</section>
Modified: branches/7.2.x/src/main/java/org/apache/coyote/http11/Constants.java
===================================================================
--- branches/7.2.x/src/main/java/org/apache/coyote/http11/Constants.java 2012-11-23
15:03:32 UTC (rev 2133)
+++ branches/7.2.x/src/main/java/org/apache/coyote/http11/Constants.java 2012-11-27
12:53:37 UTC (rev 2134)
@@ -39,6 +39,8 @@
public static final int DEFAULT_CONNECTION_LINGER = -1;
public static final int DEFAULT_CONNECTION_TIMEOUT =
Integer.valueOf(System.getProperty("org.apache.coyote.http11.DEFAULT_CONNECTION_TIMEOUT",
"60000")).intValue();
+ public static final int DEFAULT_KEEP_ALIVE_TIMEOUT =
+
Integer.valueOf(System.getProperty("org.apache.coyote.http11.DEFAULT_KEEP_ALIVE_TIMEOUT",
"-1")).intValue();
public static final int DEFAULT_CONNECTION_UPLOAD_TIMEOUT = 300000;
public static final int DEFAULT_SERVER_SOCKET_TIMEOUT = 0;
public static final boolean DEFAULT_TCP_NO_DELAY = true;
Modified: branches/7.2.x/src/main/java/org/apache/coyote/http11/Http11AprProtocol.java
===================================================================
---
branches/7.2.x/src/main/java/org/apache/coyote/http11/Http11AprProtocol.java 2012-11-23
15:03:32 UTC (rev 2133)
+++
branches/7.2.x/src/main/java/org/apache/coyote/http11/Http11AprProtocol.java 2012-11-27
12:53:37 UTC (rev 2134)
@@ -58,6 +58,7 @@
setSoTimeout(Constants.DEFAULT_CONNECTION_TIMEOUT);
//setServerSoTimeout(Constants.DEFAULT_SERVER_SOCKET_TIMEOUT);
setTcpNoDelay(Constants.DEFAULT_TCP_NO_DELAY);
+ setKeepAliveTimeout(Constants.DEFAULT_KEEP_ALIVE_TIMEOUT);
}
/** Pass config info
Modified: branches/7.2.x/src/main/java/org/apache/coyote/http11/Http11NioProtocol.java
===================================================================
---
branches/7.2.x/src/main/java/org/apache/coyote/http11/Http11NioProtocol.java 2012-11-23
15:03:32 UTC (rev 2133)
+++
branches/7.2.x/src/main/java/org/apache/coyote/http11/Http11NioProtocol.java 2012-11-27
12:53:37 UTC (rev 2134)
@@ -63,6 +63,7 @@
setSoLinger(Constants.DEFAULT_CONNECTION_LINGER);
setSoTimeout(Constants.DEFAULT_CONNECTION_TIMEOUT);
setTcpNoDelay(Constants.DEFAULT_TCP_NO_DELAY);
+ setKeepAliveTimeout(Constants.DEFAULT_KEEP_ALIVE_TIMEOUT);
}
/*
Modified: branches/7.2.x/src/main/java/org/apache/coyote/http11/Http11Protocol.java
===================================================================
--- branches/7.2.x/src/main/java/org/apache/coyote/http11/Http11Protocol.java 2012-11-23
15:03:32 UTC (rev 2133)
+++ branches/7.2.x/src/main/java/org/apache/coyote/http11/Http11Protocol.java 2012-11-27
12:53:37 UTC (rev 2134)
@@ -68,6 +68,7 @@
setSoTimeout(Constants.DEFAULT_CONNECTION_TIMEOUT);
//setServerSoTimeout(Constants.DEFAULT_SERVER_SOCKET_TIMEOUT);
setTcpNoDelay(Constants.DEFAULT_TCP_NO_DELAY);
+ setKeepAliveTimeout(Constants.DEFAULT_KEEP_ALIVE_TIMEOUT);
}
Modified: branches/7.2.x/webapps/docs/sysprops.xml
===================================================================
--- branches/7.2.x/webapps/docs/sysprops.xml 2012-11-23 15:03:32 UTC (rev 2133)
+++ branches/7.2.x/webapps/docs/sysprops.xml 2012-11-27 12:53:37 UTC (rev 2134)
@@ -158,6 +158,15 @@
<code>2048</code> bytes.</p>
</property>
+ <property
name="org.apache.coyote.http11.DEFAULT_CONNECTION_TIMEOUT">
+ <p>Default socket timeout. The default value is
<code>60000</code> ms.</p>
+ </property>
+
+ <property
name="org.apache.coyote.http11.DEFAULT_KEEP_ALIVE_TIMEOUT">
+ <p>Default socket timeout for keep alive. The default value is
<code>-1</code> ms,
+ which means it will use the default socket timeout.</p>
+ </property>
+
</properties>
</section>
Show replies by date