You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by ta...@apache.org on 2014/12/10 22:52:23 UTC
activemq git commit: https://issues.apache.org/jira/browse/AMQ-5480
Repository: activemq
Updated Branches:
refs/heads/trunk 994d9b26a -> 1409acb36
https://issues.apache.org/jira/browse/AMQ-5480
Give the user more rope.
Project: http://git-wip-us.apache.org/repos/asf/activemq/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq/commit/1409acb3
Tree: http://git-wip-us.apache.org/repos/asf/activemq/tree/1409acb3
Diff: http://git-wip-us.apache.org/repos/asf/activemq/diff/1409acb3
Branch: refs/heads/trunk
Commit: 1409acb36e0cca388e408fdd321c3f9532e8265d
Parents: 994d9b2
Author: Timothy Bish <ta...@gmail.com>
Authored: Wed Dec 10 16:51:47 2014 -0500
Committer: Timothy Bish <ta...@gmail.com>
Committed: Wed Dec 10 16:52:13 2014 -0500
----------------------------------------------------------------------
.../apache/activemq/transport/nio/SelectorManager.java | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/activemq/blob/1409acb3/activemq-client/src/main/java/org/apache/activemq/transport/nio/SelectorManager.java
----------------------------------------------------------------------
diff --git a/activemq-client/src/main/java/org/apache/activemq/transport/nio/SelectorManager.java b/activemq-client/src/main/java/org/apache/activemq/transport/nio/SelectorManager.java
index 7442b15..8469bac 100644
--- a/activemq-client/src/main/java/org/apache/activemq/transport/nio/SelectorManager.java
+++ b/activemq-client/src/main/java/org/apache/activemq/transport/nio/SelectorManager.java
@@ -43,7 +43,7 @@ public final class SelectorManager {
private int maxChannelsPerWorker = 1024;
protected ExecutorService createDefaultExecutor() {
- ThreadPoolExecutor rc = new ThreadPoolExecutor(0, Integer.MAX_VALUE, getDefaultKeepAliveTime(), TimeUnit.SECONDS, new SynchronousQueue<Runnable>(),
+ ThreadPoolExecutor rc = new ThreadPoolExecutor(getDefaultCorePoolSize(), getDefaultMaximumPoolSize(), getDefaultKeepAliveTime(), TimeUnit.SECONDS, new SynchronousQueue<Runnable>(),
new ThreadFactory() {
private long i = 0;
@@ -59,6 +59,14 @@ public final class SelectorManager {
return rc;
}
+ private static int getDefaultCorePoolSize() {
+ return Integer.getInteger("org.apache.activemq.transport.nio.SelectorManager.corePoolSize", 0);
+ }
+
+ private static int getDefaultMaximumPoolSize() {
+ return Integer.getInteger("org.apache.activemq.transport.nio.SelectorManager.maximumPoolSize", Integer.MAX_VALUE);
+ }
+
private static int getDefaultKeepAliveTime() {
return Integer.getInteger("org.apache.activemq.transport.nio.SelectorManager.keepAliveTime", 30);
}