Updated Branches:
  refs/heads/camel-2.11.x 31fddb73c -> 69ccc76bf
  refs/heads/camel-2.12.x 8228cfee9 -> ada4295fa
  refs/heads/master d389a6e44 -> 5c459fdc9


CAMEL-6941: Fixed concurrency issue when shutdown on default executor service 
manager.


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/5c459fdc
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/5c459fdc
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/5c459fdc

Branch: refs/heads/master
Commit: 5c459fdc97faa461f3491f63fbeb7d65c2ab4159
Parents: 0b4f88c
Author: Claus Ibsen <davscl...@apache.org>
Authored: Fri Nov 8 15:50:52 2013 +0100
Committer: Claus Ibsen <davscl...@apache.org>
Committed: Fri Nov 8 15:52:32 2013 +0100

----------------------------------------------------------------------
 .../org/apache/camel/impl/DefaultExecutorServiceManager.java | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/5c459fdc/camel-core/src/main/java/org/apache/camel/impl/DefaultExecutorServiceManager.java
----------------------------------------------------------------------
diff --git 
a/camel-core/src/main/java/org/apache/camel/impl/DefaultExecutorServiceManager.java
 
b/camel-core/src/main/java/org/apache/camel/impl/DefaultExecutorServiceManager.java
index dd8797d..a673382 100644
--- 
a/camel-core/src/main/java/org/apache/camel/impl/DefaultExecutorServiceManager.java
+++ 
b/camel-core/src/main/java/org/apache/camel/impl/DefaultExecutorServiceManager.java
@@ -16,13 +16,13 @@
  */
 package org.apache.camel.impl;
 
-import java.util.ArrayList;
-import java.util.HashMap;
 import java.util.Iterator;
 import java.util.LinkedHashSet;
 import java.util.List;
 import java.util.Map;
 import java.util.Set;
+import java.util.concurrent.ConcurrentHashMap;
+import java.util.concurrent.CopyOnWriteArrayList;
 import java.util.concurrent.ExecutorService;
 import java.util.concurrent.ScheduledExecutorService;
 import java.util.concurrent.ThreadFactory;
@@ -60,11 +60,11 @@ public class DefaultExecutorServiceManager extends 
ServiceSupport implements Exe
 
     private final CamelContext camelContext;
     private ThreadPoolFactory threadPoolFactory = new 
DefaultThreadPoolFactory();
-    private final List<ExecutorService> executorServices = new 
ArrayList<ExecutorService>();
+    private final List<ExecutorService> executorServices = new 
CopyOnWriteArrayList<ExecutorService>();
     private String threadNamePattern;
     private long shutdownAwaitTermination = 10000;
     private String defaultThreadPoolProfileId = "defaultThreadPoolProfile";
-    private final Map<String, ThreadPoolProfile> threadPoolProfiles = new 
HashMap<String, ThreadPoolProfile>();
+    private final Map<String, ThreadPoolProfile> threadPoolProfiles = new 
ConcurrentHashMap<String, ThreadPoolProfile>();
     private ThreadPoolProfile defaultProfile;
 
     public DefaultExecutorServiceManager(CamelContext camelContext) {

Reply via email to