By default dont use direct buffers, in a situation where a very large number of conne...
authorfhanik <fhanik@13f79535-47bb-0310-9956-ffa450edef68>
Wed, 28 Feb 2007 23:28:35 +0000 (23:28 +0000)
committerfhanik <fhanik@13f79535-47bb-0310-9956-ffa450edef68>
Wed, 28 Feb 2007 23:28:35 +0000 (23:28 +0000)
git-svn-id: https://svn.apache.org/repos/asf/tomcat/tc6.0.x/trunk@513060 13f79535-47bb-0310-9956-ffa450edef68

java/org/apache/tomcat/util/net/SocketProperties.java
webapps/docs/config/http.xml

index 746117e..71c9c2c 100644 (file)
@@ -18,24 +18,24 @@ package org.apache.tomcat.util.net;
 import java.net.Socket;\r
 import java.net.SocketException;\r
 /**\r
- * Properties that can be set in the &lt;Connector&gt; element \r
+ * Properties that can be set in the &lt;Connector&gt; element\r
  * in server.xml. All properties are prefixed with &quot;socket.&quot;\r
  * and are currently only working for the Nio connector\r
- * \r
+ *\r
  * @author Filip Hanik\r
  */\r
 public class SocketProperties {\r
     /**\r
-     * Enable/disable key cache, this bounced cache stores \r
+     * Enable/disable key cache, this bounced cache stores\r
      * KeyAttachment objects to reduce GC\r
      * Default is 100\r
      * -1 is unlimited\r
      * 0 is disabled\r
      */\r
     protected int keyCache = 500;\r
-    \r
+\r
     /**\r
-     * Enable/disable poller event cache, this bounded cache stores \r
+     * Enable/disable poller event cache, this bounded cache stores\r
      * PollerEvent objects to reduce GC for the poller\r
      * Default is -1 (unlimited)\r
      * -1 is unlimited\r
@@ -43,13 +43,13 @@ public class SocketProperties {
      * >0 the max number of objects to keep in cache.\r
      */\r
     protected int eventCache = 500;\r
-    \r
+\r
 \r
     /**\r
      * Enable/disable direct buffers for the network buffers\r
      * Default value is enabled\r
      */\r
-    protected boolean directBuffer = true;\r
+    protected boolean directBuffer = false;\r
     /**\r
      * Socket receive buffer size in bytes (SO_RCVBUF)\r
      * Default value is 25188\r
@@ -60,19 +60,19 @@ public class SocketProperties {
      * Default value is 43800\r
      */\r
     protected int txBufSize = 43800;\r
-    \r
+\r
     /**\r
      * The application read buffer size in bytes.\r
      * Default value is rxBufSize\r
      */\r
     protected int appReadBufSize = 8192;\r
-    \r
+\r
     /**\r
      * The application write buffer size in bytes\r
      * Default value is txBufSize\r
      */\r
     protected int appWriteBufSize = 8192;\r
-    \r
+\r
     /**\r
      * NioChannel pool size for the endpoint,\r
      * this value is how many channels\r
@@ -80,7 +80,7 @@ public class SocketProperties {
      * Default value is 500\r
      */\r
     protected int bufferPool = 500;\r
-    \r
+\r
 \r
     /**\r
      * Buffer pool size in bytes to be cached\r
@@ -88,7 +88,7 @@ public class SocketProperties {
      * Default value is 100MB (1024*1024*100 bytes)\r
      */\r
     protected int bufferPoolSize = 1024*1024*100;\r
-    \r
+\r
     /**\r
      * TCP_NO_DELAY option, default is true\r
      */\r
index bc80e44..4ce5c86 100644 (file)
         <p>Whether to allow comet servlets or not, Default value is true.</p>
       </attribute>
       <attribute name="socket.directBuffer" required="false">
-        <p>Boolean value, whether to use direct ByteBuffers or java mapped ByteBuffers. Default is <code>true</code>
+        <p>Boolean value, whether to use direct ByteBuffers or java mapped ByteBuffers. Default is <code>false</code>
            <br/>When you are using direct buffers, make sure you allocate the appropriate amount of memory for the 
                 direct memory space. On Sun's JDK that would be something like <code>-XX:MaxDirectMemorySize=256m</code></p>
       </attribute>