import java.net.Socket;\r
import java.net.SocketException;\r
/**\r
- * Properties that can be set in the <Connector> element \r
+ * Properties that can be set in the <Connector> element\r
* in server.xml. All properties are prefixed with "socket."\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
* >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
* 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
* Default value is 500\r
*/\r
protected int bufferPool = 500;\r
- \r
+\r
\r
/**\r
* Buffer pool size in bytes to be cached\r
* 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
<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>