From 606120d26a43fa6eaa6f50a08b509e0aca9d19e8 Mon Sep 17 00:00:00 2001 From: Matthieu Baechler Date: Wed, 8 Jun 2016 21:45:06 +0200 Subject: [PATCH] JAMES-1772 Name thread pools of AsyncServers --- .../lib/netty/AbstractConfigurableAsyncServer.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/server/protocols/protocols-library/src/main/java/org/apache/james/protocols/lib/netty/AbstractConfigurableAsyncServer.java b/server/protocols/protocols-library/src/main/java/org/apache/james/protocols/lib/netty/AbstractConfigurableAsyncServer.java index 1d2dd056a00..45751724a6b 100644 --- a/server/protocols/protocols-library/src/main/java/org/apache/james/protocols/lib/netty/AbstractConfigurableAsyncServer.java +++ b/server/protocols/protocols-library/src/main/java/org/apache/james/protocols/lib/netty/AbstractConfigurableAsyncServer.java @@ -466,12 +466,12 @@ protected String getThreadPoolJMXPath() { @Override protected Executor createBossExecutor() { - return JMXEnabledThreadPoolExecutor.newCachedThreadPool(getThreadPoolJMXPath(), "boss"); + return JMXEnabledThreadPoolExecutor.newCachedThreadPool(getThreadPoolJMXPath(), getDefaultJMXName() + "-boss"); } @Override protected Executor createWorkerExecutor() { - return JMXEnabledThreadPoolExecutor.newCachedThreadPool(getThreadPoolJMXPath(), "worker"); + return JMXEnabledThreadPoolExecutor.newCachedThreadPool(getThreadPoolJMXPath(), getDefaultJMXName() + "-worker"); } /** @@ -561,7 +561,7 @@ protected void configureBootstrap(ServerBootstrap bootstrap) { * @return ehandler */ protected ExecutionHandler createExecutionHander() { - return new ExecutionHandler(new JMXEnabledOrderedMemoryAwareThreadPoolExecutor(maxExecutorThreads, 0, 0, getThreadPoolJMXPath(), "executor")); + return new ExecutionHandler(new JMXEnabledOrderedMemoryAwareThreadPoolExecutor(maxExecutorThreads, 0, 0, getThreadPoolJMXPath(), getDefaultJMXName() + "-executor")); } /**