Author: davsclaus Date: Thu Jun 17 16:56:03 2010 New Revision: 955673 URL: http://svn.apache.org/viewvc?rev=955673&view=rev Log: CAMEL-2723: Fixed tests.
Modified: camel/trunk/camel-core/src/main/java/org/apache/camel/impl/DefaultExecutorServiceStrategy.java Modified: camel/trunk/camel-core/src/main/java/org/apache/camel/impl/DefaultExecutorServiceStrategy.java URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/impl/DefaultExecutorServiceStrategy.java?rev=955673&r1=955672&r2=955673&view=diff ============================================================================== --- camel/trunk/camel-core/src/main/java/org/apache/camel/impl/DefaultExecutorServiceStrategy.java (original) +++ camel/trunk/camel-core/src/main/java/org/apache/camel/impl/DefaultExecutorServiceStrategy.java Thu Jun 17 16:56:03 2010 @@ -18,6 +18,7 @@ package org.apache.camel.impl; import java.util.ArrayList; import java.util.HashMap; +import java.util.Iterator; import java.util.List; import java.util.Map; import java.util.concurrent.ExecutorService; @@ -336,7 +337,15 @@ public class DefaultExecutorServiceStrat } } executorServices.clear(); - threadPoolProfiles.clear(); + + // do not clear the default profile as we could potential be restarted + Iterator<ThreadPoolProfile> it = threadPoolProfiles.values().iterator(); + while (it.hasNext()) { + ThreadPoolProfile profile = it.next(); + if (!profile.isDefaultProfile()) { + it.remove(); + } + } } }