You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ma...@apache.org on 2014/06/05 22:29:54 UTC
svn commit: r1600750 - in /tomcat/tc7.0.x/trunk: ./
java/org/apache/tomcat/websocket/server/WsServerContainer.java
webapps/docs/changelog.xml webapps/docs/web-socket-howto.xml
Author: markt
Date: Thu Jun 5 20:29:54 2014
New Revision: 1600750
URL: http://svn.apache.org/r1600750
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=56577
Better executor configuration.
Modified:
tomcat/tc7.0.x/trunk/ (props changed)
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/websocket/server/WsServerContainer.java
tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml
tomcat/tc7.0.x/trunk/webapps/docs/web-socket-howto.xml
Propchange: tomcat/tc7.0.x/trunk/
------------------------------------------------------------------------------
Merged /tomcat/trunk:r1600743
Modified: tomcat/tc7.0.x/trunk/java/org/apache/tomcat/websocket/server/WsServerContainer.java
URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/tomcat/websocket/server/WsServerContainer.java?rev=1600750&r1=1600749&r2=1600750&view=diff
==============================================================================
--- tomcat/tc7.0.x/trunk/java/org/apache/tomcat/websocket/server/WsServerContainer.java (original)
+++ tomcat/tc7.0.x/trunk/java/org/apache/tomcat/websocket/server/WsServerContainer.java Thu Jun 5 20:29:54 2014
@@ -27,7 +27,7 @@ import java.util.SortedSet;
import java.util.TreeSet;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ExecutorService;
-import java.util.concurrent.LinkedBlockingQueue;
+import java.util.concurrent.SynchronousQueue;
import java.util.concurrent.ThreadFactory;
import java.util.concurrent.ThreadPoolExecutor;
import java.util.concurrent.TimeUnit;
@@ -119,7 +119,6 @@ public class WsServerContainer extends W
}
// Executor config
int executorCoreSize = 0;
- int executorMaxSize = 200;
long executorKeepAliveTimeSeconds = 60;
value = servletContext.getInitParameter(
Constants.EXECUTOR_CORE_SIZE_INIT_PARAM);
@@ -127,11 +126,6 @@ public class WsServerContainer extends W
executorCoreSize = Integer.parseInt(value);
}
value = servletContext.getInitParameter(
- Constants.EXECUTOR_MAX_SIZE_INIT_PARAM);
- if (value != null) {
- executorMaxSize = Integer.parseInt(value);
- }
- value = servletContext.getInitParameter(
Constants.EXECUTOR_KEEPALIVETIME_SECONDS_INIT_PARAM);
if (value != null) {
executorKeepAliveTimeSeconds = Long.parseLong(value);
@@ -159,8 +153,8 @@ public class WsServerContainer extends W
WsThreadFactory wsThreadFactory = new WsThreadFactory(threadGroup);
executorService = new ThreadPoolExecutor(executorCoreSize,
- executorMaxSize, executorKeepAliveTimeSeconds, TimeUnit.SECONDS,
- new LinkedBlockingQueue<Runnable>(), wsThreadFactory);
+ Integer.MAX_VALUE, executorKeepAliveTimeSeconds, TimeUnit.SECONDS,
+ new SynchronousQueue<Runnable>(), wsThreadFactory);
}
Modified: tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml
URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml?rev=1600750&r1=1600749&r2=1600750&view=diff
==============================================================================
--- tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml Thu Jun 5 20:29:54 2014
@@ -118,6 +118,10 @@
behaviour for <code>Session.getRequestURI()</code> which may result in
further changes. (markt)
</fix>
+ <fix>
+ <bug>56577</bug>: Improve the executor configuration used for the
+ callbacks associated with asynchronous writes. (markt)
+ </fix>
</changelog>
</subsection>
</section>
Modified: tomcat/tc7.0.x/trunk/webapps/docs/web-socket-howto.xml
URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/webapps/docs/web-socket-howto.xml?rev=1600750&r1=1600749&r2=1600750&view=diff
==============================================================================
--- tomcat/tc7.0.x/trunk/webapps/docs/web-socket-howto.xml (original)
+++ tomcat/tc7.0.x/trunk/webapps/docs/web-socket-howto.xml Thu Jun 5 20:29:54 2014
@@ -120,10 +120,9 @@ implement its own timeout mechanism to h
<ul>
<li><code>org.apache.tomcat.websocket.executorCoreSize</code>: The core
size of the executor thread pool. If not set, the default of 0 (zero)
- is used.</li>
- <li><code>org.apache.tomcat.websocket.executorMaxSize</code>: The maximum
- permitted size of the executor thread pool. If not set, the default of
- 200 is used.</li>
+ is used. Note that the maximum permitted size of the executor thread
+ pool is hard coded to <code>Integer.MAX_VALUE</code> which effectively
+ means it is unlimited.</li>
<li><code>org.apache.tomcat.websocket.executorKeepAliveTimeSeconds</code>:
The maximum time an idle thread will remain in the executor thread pool
until it is terminated. If not specified, the default of 60 seconds is
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org