[jboss-cvs] JBossAS SVN: r110523 - in projects/jboss-jca/trunk: web/src/main/java/org/jboss/jca/web and 1 other directory.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Thu Feb 3 12:07:47 EST 2011
Author: jesper.pedersen
Date: 2011-02-03 12:07:46 -0500 (Thu, 03 Feb 2011)
New Revision: 110523
Modified:
projects/jboss-jca/trunk/doc/userguide/en-US/modules/configuration.xml
projects/jboss-jca/trunk/web/src/main/java/org/jboss/jca/web/WebServer.java
Log:
Set acceptors / acceptQueueSize for web setup
Modified: projects/jboss-jca/trunk/doc/userguide/en-US/modules/configuration.xml
===================================================================
--- projects/jboss-jca/trunk/doc/userguide/en-US/modules/configuration.xml 2011-02-03 16:52:09 UTC (rev 110522)
+++ projects/jboss-jca/trunk/doc/userguide/en-US/modules/configuration.xml 2011-02-03 17:07:46 UTC (rev 110523)
@@ -568,6 +568,14 @@
</entry>
</row>
<row>
+ <entry><code>AcceptQueueSize</code></entry>
+ <entry><code>int</code></entry>
+ <entry>
+ Set the accept queue size for the Jetty connector
+ <para>Default: <code>64</code></para>
+ </entry>
+ </row>
+ <row>
<entry><code>ExecutorService</code></entry>
<entry><code>java.util.concurrent.​ExecutorService</code></entry>
<entry>
Modified: projects/jboss-jca/trunk/web/src/main/java/org/jboss/jca/web/WebServer.java
===================================================================
--- projects/jboss-jca/trunk/web/src/main/java/org/jboss/jca/web/WebServer.java 2011-02-03 16:52:09 UTC (rev 110522)
+++ projects/jboss-jca/trunk/web/src/main/java/org/jboss/jca/web/WebServer.java 2011-02-03 17:07:46 UTC (rev 110523)
@@ -52,6 +52,9 @@
/** The port */
private int port;
+ /** The AcceptQueueSize */
+ private int acceptQueueSize;
+
/** Executor service */
private ExecutorService executorService;
@@ -66,6 +69,7 @@
this.server = null;
this.host = "localhost";
this.port = 8080;
+ this.acceptQueueSize = 64;
this.executorService = null;
this.handlers = new HandlerList();
}
@@ -98,6 +102,24 @@
}
/**
+ * Get the accept queue size
+ * @return The value
+ */
+ public int getAcceptQueueSize()
+ {
+ return acceptQueueSize;
+ }
+
+ /**
+ * Set the accept queue size
+ * @param v The value
+ */
+ public void setAcceptQueueSize(int v)
+ {
+ this.acceptQueueSize = v;
+ }
+
+ /**
* Set the executor service
* @param service The service
*/
@@ -116,9 +138,11 @@
server = new Server();
- Connector connector = new SocketConnector();
+ SocketConnector connector = new SocketConnector();
connector.setHost(host);
connector.setPort(port);
+ connector.setAcceptors(2 * Runtime.getRuntime().availableProcessors());
+ connector.setAcceptQueueSize(acceptQueueSize);
server.setConnectors(new Connector[]{connector});
More information about the jboss-cvs-commits
mailing list