Author: remy.maucherat(a)jboss.com
Date: 2014-06-05 17:51:29 -0400 (Thu, 05 Jun 2014)
New Revision: 2448
Modified:
branches/7.4.x/src/main/java/org/apache/tomcat/websocket/server/WsServerContainer.java
branches/7.4.x/src/main/java/org/jboss/web/WebsocketsMessages.java
Log:
Port Tomcat patch: fix again executor configuration.
Modified:
branches/7.4.x/src/main/java/org/apache/tomcat/websocket/server/WsServerContainer.java
===================================================================
---
branches/7.4.x/src/main/java/org/apache/tomcat/websocket/server/WsServerContainer.java 2014-06-05
21:50:35 UTC (rev 2447)
+++
branches/7.4.x/src/main/java/org/apache/tomcat/websocket/server/WsServerContainer.java 2014-06-05
21:51:29 UTC (rev 2448)
@@ -30,6 +30,7 @@
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;
@@ -135,7 +136,6 @@
}
// Executor config
int executorCoreSize = 0;
- int executorMaxSize = 200;
long executorKeepAliveTimeSeconds = 60;
value = servletContext.getInitParameter(
Constants.EXECUTOR_CORE_SIZE_INIT_PARAM);
@@ -143,11 +143,6 @@
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);
@@ -175,8 +170,8 @@
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: branches/7.4.x/src/main/java/org/jboss/web/WebsocketsMessages.java
===================================================================
--- branches/7.4.x/src/main/java/org/jboss/web/WebsocketsMessages.java 2014-06-05 21:50:35
UTC (rev 2447)
+++ branches/7.4.x/src/main/java/org/jboss/web/WebsocketsMessages.java 2014-06-05 21:51:29
UTC (rev 2448)
@@ -308,4 +308,7 @@
@Message(id = 8590, value = "Closing session following IO error")
String closeAfterError();
+ @Message(id = 8591, value = "Unknown scheme %s")
+ IllegalArgumentException unknownScheme(String scheme);
+
}
Show replies by date