camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cschnei...@apache.org
Subject svn commit: r1151762 [3/4] - in /camel/trunk: camel-core/src/main/java/org/apache/camel/ camel-core/src/main/java/org/apache/camel/builder/ camel-core/src/main/java/org/apache/camel/component/bean/ camel-core/src/main/java/org/apache/camel/component/da...
Date Thu, 28 Jul 2011 08:40:15 GMT
Modified: camel/trunk/camel-core/src/test/java/org/apache/camel/component/file/FileProduceAppendTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/test/java/org/apache/camel/component/file/FileProduceAppendTest.java?rev=1151762&r1=1151761&r2=1151762&view=diff
==============================================================================
--- camel/trunk/camel-core/src/test/java/org/apache/camel/component/file/FileProduceAppendTest.java (original)
+++ camel/trunk/camel-core/src/test/java/org/apache/camel/component/file/FileProduceAppendTest.java Thu Jul 28 08:39:35 2011
@@ -16,8 +16,6 @@
  */
 package org.apache.camel.component.file;
 
-import java.io.File;
-
 import org.apache.camel.ContextTestSupport;
 import org.apache.camel.Exchange;
 import org.apache.camel.builder.RouteBuilder;

Modified: camel/trunk/camel-core/src/test/java/org/apache/camel/component/file/NewFileConsumeTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/test/java/org/apache/camel/component/file/NewFileConsumeTest.java?rev=1151762&r1=1151761&r2=1151762&view=diff
==============================================================================
--- camel/trunk/camel-core/src/test/java/org/apache/camel/component/file/NewFileConsumeTest.java (original)
+++ camel/trunk/camel-core/src/test/java/org/apache/camel/component/file/NewFileConsumeTest.java Thu Jul 28 08:39:35 2011
@@ -19,7 +19,6 @@ package org.apache.camel.component.file;
 import java.io.File;
 import java.io.FileOutputStream;
 import java.util.HashMap;
-import java.util.Map;
 import java.util.concurrent.CountDownLatch;
 
 import org.apache.camel.Consumer;

Modified: camel/trunk/camel-core/src/test/java/org/apache/camel/component/file/NewFileProduceTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/test/java/org/apache/camel/component/file/NewFileProduceTest.java?rev=1151762&r1=1151761&r2=1151762&view=diff
==============================================================================
--- camel/trunk/camel-core/src/test/java/org/apache/camel/component/file/NewFileProduceTest.java (original)
+++ camel/trunk/camel-core/src/test/java/org/apache/camel/component/file/NewFileProduceTest.java Thu Jul 28 08:39:35 2011
@@ -18,8 +18,6 @@ package org.apache.camel.component.file;
 
 import java.io.File;
 import java.util.HashMap;
-import java.util.Map;
-
 import org.apache.camel.ContextTestSupport;
 import org.apache.camel.Endpoint;
 import org.apache.camel.Exchange;

Modified: camel/trunk/camel-core/src/test/java/org/apache/camel/component/file/XPathToFileTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/test/java/org/apache/camel/component/file/XPathToFileTest.java?rev=1151762&r1=1151761&r2=1151762&view=diff
==============================================================================
--- camel/trunk/camel-core/src/test/java/org/apache/camel/component/file/XPathToFileTest.java (original)
+++ camel/trunk/camel-core/src/test/java/org/apache/camel/component/file/XPathToFileTest.java Thu Jul 28 08:39:35 2011
@@ -24,9 +24,6 @@ import org.apache.camel.ContextTestSuppo
 import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.component.mock.MockEndpoint;
 
-
-import static org.apache.camel.builder.xml.XPathBuilder.xpath;
-
 /**
  * @version 
  */

Modified: camel/trunk/camel-core/src/test/java/org/apache/camel/component/seda/SedaInOnlyChainedTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/test/java/org/apache/camel/component/seda/SedaInOnlyChainedTest.java?rev=1151762&r1=1151761&r2=1151762&view=diff
==============================================================================
--- camel/trunk/camel-core/src/test/java/org/apache/camel/component/seda/SedaInOnlyChainedTest.java (original)
+++ camel/trunk/camel-core/src/test/java/org/apache/camel/component/seda/SedaInOnlyChainedTest.java Thu Jul 28 08:39:35 2011
@@ -19,8 +19,6 @@ package org.apache.camel.component.seda;
 import org.apache.camel.ContextTestSupport;
 import org.apache.camel.builder.RouteBuilder;
 
-import static org.apache.camel.language.simple.SimpleLanguage.simple;
-
 /**
  * @version 
  */

Modified: camel/trunk/camel-core/src/test/java/org/apache/camel/component/seda/SedaInOutBigChainedTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/test/java/org/apache/camel/component/seda/SedaInOutBigChainedTest.java?rev=1151762&r1=1151761&r2=1151762&view=diff
==============================================================================
--- camel/trunk/camel-core/src/test/java/org/apache/camel/component/seda/SedaInOutBigChainedTest.java (original)
+++ camel/trunk/camel-core/src/test/java/org/apache/camel/component/seda/SedaInOutBigChainedTest.java Thu Jul 28 08:39:35 2011
@@ -19,8 +19,6 @@ package org.apache.camel.component.seda;
 import org.apache.camel.ContextTestSupport;
 import org.apache.camel.builder.RouteBuilder;
 
-import static org.apache.camel.language.simple.SimpleLanguage.simple;
-
 /**
  * @version 
  */

Modified: camel/trunk/camel-core/src/test/java/org/apache/camel/component/seda/SedaInOutChainedTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/test/java/org/apache/camel/component/seda/SedaInOutChainedTest.java?rev=1151762&r1=1151761&r2=1151762&view=diff
==============================================================================
--- camel/trunk/camel-core/src/test/java/org/apache/camel/component/seda/SedaInOutChainedTest.java (original)
+++ camel/trunk/camel-core/src/test/java/org/apache/camel/component/seda/SedaInOutChainedTest.java Thu Jul 28 08:39:35 2011
@@ -19,8 +19,6 @@ package org.apache.camel.component.seda;
 import org.apache.camel.ContextTestSupport;
 import org.apache.camel.builder.RouteBuilder;
 
-import static org.apache.camel.language.simple.SimpleLanguage.simple;
-
 /**
  * @version 
  */

Modified: camel/trunk/camel-core/src/test/java/org/apache/camel/component/seda/SedaInOutChainedWithOnCompletionTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/test/java/org/apache/camel/component/seda/SedaInOutChainedWithOnCompletionTest.java?rev=1151762&r1=1151761&r2=1151762&view=diff
==============================================================================
--- camel/trunk/camel-core/src/test/java/org/apache/camel/component/seda/SedaInOutChainedWithOnCompletionTest.java (original)
+++ camel/trunk/camel-core/src/test/java/org/apache/camel/component/seda/SedaInOutChainedWithOnCompletionTest.java Thu Jul 28 08:39:35 2011
@@ -22,8 +22,6 @@ import org.apache.camel.Processor;
 import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.impl.SynchronizationAdapter;
 
-import static org.apache.camel.language.simple.SimpleLanguage.simple;
-
 /**
  * @version 
  */

Modified: camel/trunk/camel-core/src/test/java/org/apache/camel/component/seda/SedaMultipleConsumersTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/test/java/org/apache/camel/component/seda/SedaMultipleConsumersTest.java?rev=1151762&r1=1151761&r2=1151762&view=diff
==============================================================================
--- camel/trunk/camel-core/src/test/java/org/apache/camel/component/seda/SedaMultipleConsumersTest.java (original)
+++ camel/trunk/camel-core/src/test/java/org/apache/camel/component/seda/SedaMultipleConsumersTest.java Thu Jul 28 08:39:35 2011
@@ -18,7 +18,6 @@ package org.apache.camel.component.seda;
 
 import org.apache.camel.ContextTestSupport;
 import org.apache.camel.builder.RouteBuilder;
-import org.apache.camel.component.mock.MockEndpoint;
 
 /**
  * @version 

Modified: camel/trunk/camel-core/src/test/java/org/apache/camel/component/vm/VmInOnlyChainedTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/test/java/org/apache/camel/component/vm/VmInOnlyChainedTest.java?rev=1151762&r1=1151761&r2=1151762&view=diff
==============================================================================
--- camel/trunk/camel-core/src/test/java/org/apache/camel/component/vm/VmInOnlyChainedTest.java (original)
+++ camel/trunk/camel-core/src/test/java/org/apache/camel/component/vm/VmInOnlyChainedTest.java Thu Jul 28 08:39:35 2011
@@ -19,8 +19,6 @@ package org.apache.camel.component.vm;
 import org.apache.camel.ContextTestSupport;
 import org.apache.camel.builder.RouteBuilder;
 
-import static org.apache.camel.language.simple.SimpleLanguage.simple;
-
 /**
  * @version 
  */

Modified: camel/trunk/camel-core/src/test/java/org/apache/camel/component/vm/VmInOutChainedTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/test/java/org/apache/camel/component/vm/VmInOutChainedTest.java?rev=1151762&r1=1151761&r2=1151762&view=diff
==============================================================================
--- camel/trunk/camel-core/src/test/java/org/apache/camel/component/vm/VmInOutChainedTest.java (original)
+++ camel/trunk/camel-core/src/test/java/org/apache/camel/component/vm/VmInOutChainedTest.java Thu Jul 28 08:39:35 2011
@@ -19,8 +19,6 @@ package org.apache.camel.component.vm;
 import org.apache.camel.ContextTestSupport;
 import org.apache.camel.builder.RouteBuilder;
 
-import static org.apache.camel.language.simple.SimpleLanguage.simple;
-
 /**
  * @version 
  */

Modified: camel/trunk/camel-core/src/test/java/org/apache/camel/converter/stream/FileInputStreamCacheTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/test/java/org/apache/camel/converter/stream/FileInputStreamCacheTest.java?rev=1151762&r1=1151761&r2=1151762&view=diff
==============================================================================
--- camel/trunk/camel-core/src/test/java/org/apache/camel/converter/stream/FileInputStreamCacheTest.java (original)
+++ camel/trunk/camel-core/src/test/java/org/apache/camel/converter/stream/FileInputStreamCacheTest.java Thu Jul 28 08:39:35 2011
@@ -20,8 +20,6 @@ import java.io.ByteArrayOutputStream;
 import java.io.File;
 
 import org.apache.camel.ContextTestSupport;
-import org.apache.camel.Exchange;
-import org.apache.camel.impl.DefaultExchange;
 
 /**
  * @version 

Modified: camel/trunk/camel-core/src/test/java/org/apache/camel/impl/CamelCustomDefaultThreadPoolProfileTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/test/java/org/apache/camel/impl/CamelCustomDefaultThreadPoolProfileTest.java?rev=1151762&r1=1151761&r2=1151762&view=diff
==============================================================================
--- camel/trunk/camel-core/src/test/java/org/apache/camel/impl/CamelCustomDefaultThreadPoolProfileTest.java (original)
+++ camel/trunk/camel-core/src/test/java/org/apache/camel/impl/CamelCustomDefaultThreadPoolProfileTest.java Thu Jul 28 08:39:35 2011
@@ -31,19 +31,20 @@ public class CamelCustomDefaultThreadPoo
     protected CamelContext createCamelContext() throws Exception {
         CamelContext camel = super.createCamelContext();
 
-        ThreadPoolProfile profile = new ThreadPoolProfileSupport("custom");
+        ThreadPoolProfile profile = new ThreadPoolProfile("custom");
         profile.setPoolSize(5);
         profile.setMaxPoolSize(15);
         profile.setKeepAliveTime(25L);
         profile.setMaxQueueSize(250);
         profile.setRejectedPolicy(ThreadPoolRejectedPolicy.Abort);
 
-        camel.getExecutorServiceStrategy().setDefaultThreadPoolProfile(profile);
+        camel.getExecutorServiceManager().setDefaultThreadPoolProfile(profile);
         return camel;
     }
 
     public void testCamelCustomDefaultThreadPoolProfile() throws Exception {
-        ThreadPoolProfile profile = context.getExecutorServiceStrategy().getDefaultThreadPoolProfile();
+        DefaultExecutorServiceManager manager = (DefaultExecutorServiceManager)context.getExecutorServiceManager();
+        ThreadPoolProfile profile = manager.getDefaultThreadPoolProfile();
         assertEquals(5, profile.getPoolSize().intValue());
         assertEquals(15, profile.getMaxPoolSize().intValue());
         assertEquals(25, profile.getKeepAliveTime().longValue());

Modified: camel/trunk/camel-core/src/test/java/org/apache/camel/impl/CamelPostProcessorHelperTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/test/java/org/apache/camel/impl/CamelPostProcessorHelperTest.java?rev=1151762&r1=1151761&r2=1151762&view=diff
==============================================================================
--- camel/trunk/camel-core/src/test/java/org/apache/camel/impl/CamelPostProcessorHelperTest.java (original)
+++ camel/trunk/camel-core/src/test/java/org/apache/camel/impl/CamelPostProcessorHelperTest.java Thu Jul 28 08:39:35 2011
@@ -25,7 +25,6 @@ import org.apache.camel.EndpointInject;
 import org.apache.camel.Exchange;
 import org.apache.camel.NoSuchBeanException;
 import org.apache.camel.PollingConsumer;
-import org.apache.camel.Processor;
 import org.apache.camel.Produce;
 import org.apache.camel.Producer;
 import org.apache.camel.ProducerTemplate;

Copied: camel/trunk/camel-core/src/test/java/org/apache/camel/impl/DefaultExecutorServiceManagerTest.java (from r1149056, camel/trunk/camel-core/src/test/java/org/apache/camel/impl/DefaultExecutorServiceStrategyTest.java)
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/test/java/org/apache/camel/impl/DefaultExecutorServiceManagerTest.java?p2=camel/trunk/camel-core/src/test/java/org/apache/camel/impl/DefaultExecutorServiceManagerTest.java&p1=camel/trunk/camel-core/src/test/java/org/apache/camel/impl/DefaultExecutorServiceStrategyTest.java&r1=1149056&r2=1151762&rev=1151762&view=diff
==============================================================================
--- camel/trunk/camel-core/src/test/java/org/apache/camel/impl/DefaultExecutorServiceStrategyTest.java (original)
+++ camel/trunk/camel-core/src/test/java/org/apache/camel/impl/DefaultExecutorServiceManagerTest.java Thu Jul 28 08:39:35 2011
@@ -22,15 +22,24 @@ import java.util.concurrent.TimeUnit;
 
 import org.apache.camel.ContextTestSupport;
 import org.apache.camel.ThreadPoolRejectedPolicy;
+import org.apache.camel.spi.ThreadPoolProfile;
+import org.apache.camel.util.concurrent.ThreadHelper;
 
 /**
  * @version 
  */
-public class DefaultExecutorServiceStrategyTest extends ContextTestSupport {
+public class DefaultExecutorServiceManagerTest extends ContextTestSupport {
+    
+    public void testGetThreadName() {
+        String name = ThreadHelper.resolveThreadName("Camel Thread ${counter} - ${name}", "foo");
+
+        assertTrue(name.startsWith("Camel Thread"));
+        assertTrue(name.endsWith("foo"));
+    }
 
     public void testGetThreadNameDefaultPattern() throws Exception {
-        String foo = context.getExecutorServiceStrategy().getThreadName("foo");
-        String bar = context.getExecutorServiceStrategy().getThreadName("bar");
+        String foo = context.getExecutorServiceManager().resolveThreadName("foo");
+        String bar = context.getExecutorServiceManager().resolveThreadName("bar");
 
         assertNotSame(foo, bar);
         assertTrue(foo.startsWith("Camel (" + context.getName() + ") thread "));
@@ -40,9 +49,9 @@ public class DefaultExecutorServiceStrat
     }
 
     public void testGetThreadNameCustomPattern() throws Exception {
-        context.getExecutorServiceStrategy().setThreadNamePattern("#${counter} - ${name}");
-        String foo = context.getExecutorServiceStrategy().getThreadName("foo");
-        String bar = context.getExecutorServiceStrategy().getThreadName("bar");
+        context.getExecutorServiceManager().setThreadNamePattern("#${counter} - ${name}");
+        String foo = context.getExecutorServiceManager().resolveThreadName("foo");
+        String bar = context.getExecutorServiceManager().resolveThreadName("bar");
 
         assertNotSame(foo, bar);
         assertTrue(foo.startsWith("#"));
@@ -52,9 +61,9 @@ public class DefaultExecutorServiceStrat
     }
 
     public void testGetThreadNameCustomPatternCamelId() throws Exception {
-        context.getExecutorServiceStrategy().setThreadNamePattern("#${camelId} - #${counter} - ${name}");
-        String foo = context.getExecutorServiceStrategy().getThreadName("foo");
-        String bar = context.getExecutorServiceStrategy().getThreadName("bar");
+        context.getExecutorServiceManager().setThreadNamePattern("#${camelId} - #${counter} - ${name}");
+        String foo = context.getExecutorServiceManager().resolveThreadName("foo");
+        String bar = context.getExecutorServiceManager().resolveThreadName("bar");
 
         assertNotSame(foo, bar);
         assertTrue(foo.startsWith("#" + context.getName() + " - #"));
@@ -64,16 +73,16 @@ public class DefaultExecutorServiceStrat
     }
 
     public void testGetThreadNameCustomPatternWithDollar() throws Exception {
-        context.getExecutorServiceStrategy().setThreadNamePattern("Hello - ${name}");
-        String foo = context.getExecutorServiceStrategy().getThreadName("foo$bar");
+        context.getExecutorServiceManager().setThreadNamePattern("Hello - ${name}");
+        String foo = context.getExecutorServiceManager().resolveThreadName("foo$bar");
 
         assertEquals("Hello - foo$bar", foo);
     }
 
     public void testGetThreadNameCustomPatternLongName() throws Exception {
-        context.getExecutorServiceStrategy().setThreadNamePattern("#${counter} - ${longName}");
-        String foo = context.getExecutorServiceStrategy().getThreadName("foo?beer=Carlsberg");
-        String bar = context.getExecutorServiceStrategy().getThreadName("bar");
+        context.getExecutorServiceManager().setThreadNamePattern("#${counter} - ${longName}");
+        String foo = context.getExecutorServiceManager().resolveThreadName("foo?beer=Carlsberg");
+        String bar = context.getExecutorServiceManager().resolveThreadName("bar");
 
         assertNotSame(foo, bar);
         assertTrue(foo.startsWith("#"));
@@ -83,9 +92,9 @@ public class DefaultExecutorServiceStrat
     }
 
     public void testGetThreadNameCustomPatternWithParameters() throws Exception {
-        context.getExecutorServiceStrategy().setThreadNamePattern("#${counter} - ${name}");
-        String foo = context.getExecutorServiceStrategy().getThreadName("foo?beer=Carlsberg");
-        String bar = context.getExecutorServiceStrategy().getThreadName("bar");
+        context.getExecutorServiceManager().setThreadNamePattern("#${counter} - ${name}");
+        String foo = context.getExecutorServiceManager().resolveThreadName("foo?beer=Carlsberg");
+        String bar = context.getExecutorServiceManager().resolveThreadName("bar");
 
         assertNotSame(foo, bar);
         assertTrue(foo.startsWith("#"));
@@ -95,9 +104,9 @@ public class DefaultExecutorServiceStrat
     }
 
     public void testGetThreadNameCustomPatternNoCounter() throws Exception {
-        context.getExecutorServiceStrategy().setThreadNamePattern("Cool ${name}");
-        String foo = context.getExecutorServiceStrategy().getThreadName("foo");
-        String bar = context.getExecutorServiceStrategy().getThreadName("bar");
+        context.getExecutorServiceManager().setThreadNamePattern("Cool ${name}");
+        String foo = context.getExecutorServiceManager().resolveThreadName("foo");
+        String bar = context.getExecutorServiceManager().resolveThreadName("bar");
 
         assertNotSame(foo, bar);
         assertEquals("Cool foo", foo);
@@ -105,20 +114,20 @@ public class DefaultExecutorServiceStrat
     }
 
     public void testGetThreadNameCustomPatternInvalid() throws Exception {
-        context.getExecutorServiceStrategy().setThreadNamePattern("Cool ${xxx}");
+        context.getExecutorServiceManager().setThreadNamePattern("Cool ${xxx}");
         try {
-            context.getExecutorServiceStrategy().getThreadName("foo");
+            context.getExecutorServiceManager().resolveThreadName("foo");
             fail("Should thrown an exception");
         } catch (IllegalArgumentException e) {
             assertEquals("Pattern is invalid: Cool ${xxx}", e.getMessage());
         }
 
         // reset it so we can shutdown properly
-        context.getExecutorServiceStrategy().setThreadNamePattern("Camel Thread ${counter} - ${name}");
+        context.getExecutorServiceManager().setThreadNamePattern("Camel Thread ${counter} - ${name}");
     }
 
     public void testDefaultThreadPool() throws Exception {
-        ExecutorService myPool = context.getExecutorServiceStrategy().newDefaultThreadPool(this, "myPool");
+        ExecutorService myPool = context.getExecutorServiceManager().getDefaultExecutorService("myPool", this);
         assertEquals(false, myPool.isShutdown());
 
         // should use default settings
@@ -133,16 +142,16 @@ public class DefaultExecutorServiceStrat
     }
 
     public void testDefaultUnboundedQueueThreadPool() throws Exception {
-        ThreadPoolProfileSupport custom = new ThreadPoolProfileSupport("custom");
+        ThreadPoolProfile custom = new ThreadPoolProfile("custom");
         custom.setPoolSize(10);
         custom.setMaxPoolSize(30);
         custom.setKeepAliveTime(50L);
         custom.setMaxQueueSize(-1);
 
-        context.getExecutorServiceStrategy().setDefaultThreadPoolProfile(custom);
+        context.getExecutorServiceManager().setDefaultThreadPoolProfile(custom);
         assertEquals(true, custom.isDefaultProfile().booleanValue());
 
-        ExecutorService myPool = context.getExecutorServiceStrategy().newDefaultThreadPool(this, "myPool");
+        ExecutorService myPool = context.getExecutorServiceManager().getDefaultExecutorService("myPool", this);
         assertEquals(false, myPool.isShutdown());
 
         // should use default settings
@@ -157,16 +166,16 @@ public class DefaultExecutorServiceStrat
     }
 
     public void testCustomDefaultThreadPool() throws Exception {
-        ThreadPoolProfileSupport custom = new ThreadPoolProfileSupport("custom");
+        ThreadPoolProfile custom = new ThreadPoolProfile("custom");
         custom.setKeepAliveTime(20L);
         custom.setMaxPoolSize(40);
         custom.setPoolSize(5);
         custom.setMaxQueueSize(2000);
 
-        context.getExecutorServiceStrategy().setDefaultThreadPoolProfile(custom);
+        context.getExecutorServiceManager().setDefaultThreadPoolProfile(custom);
         assertEquals(true, custom.isDefaultProfile().booleanValue());
 
-        ExecutorService myPool = context.getExecutorServiceStrategy().newDefaultThreadPool(this, "myPool");
+        ExecutorService myPool = context.getExecutorServiceManager().getDefaultExecutorService("myPool", this);
         assertEquals(false, myPool.isShutdown());
 
         // should use default settings
@@ -181,54 +190,52 @@ public class DefaultExecutorServiceStrat
     }
 
     public void testGetThreadPoolProfile() throws Exception {
-        assertNull(context.getExecutorServiceStrategy().getThreadPoolProfile("foo"));
-
-        ThreadPoolProfileSupport foo = new ThreadPoolProfileSupport("foo");
+        ThreadPoolProfile foo = new ThreadPoolProfile("foo");
         foo.setKeepAliveTime(20L);
         foo.setMaxPoolSize(40);
         foo.setPoolSize(5);
         foo.setMaxQueueSize(2000);
 
-        context.getExecutorServiceStrategy().registerThreadPoolProfile(foo);
+        context.getExecutorServiceManager().registerThreadPoolProfile(foo);
 
-        assertSame(foo, context.getExecutorServiceStrategy().getThreadPoolProfile("foo"));
+        assertSame(foo, context.getExecutorServiceManager().getThreadPoolProfile("foo"));
     }
 
     public void testTwoGetThreadPoolProfile() throws Exception {
-        assertNull(context.getExecutorServiceStrategy().getThreadPoolProfile("foo"));
+        assertNull(context.getExecutorServiceManager().getThreadPoolProfile("foo"));
 
-        ThreadPoolProfileSupport foo = new ThreadPoolProfileSupport("foo");
+        ThreadPoolProfile foo = new ThreadPoolProfile("foo");
         foo.setKeepAliveTime(20L);
         foo.setMaxPoolSize(40);
         foo.setPoolSize(5);
         foo.setMaxQueueSize(2000);
 
-        context.getExecutorServiceStrategy().registerThreadPoolProfile(foo);
+        context.getExecutorServiceManager().registerThreadPoolProfile(foo);
 
-        ThreadPoolProfileSupport bar = new ThreadPoolProfileSupport("bar");
+        ThreadPoolProfile bar = new ThreadPoolProfile("bar");
         bar.setKeepAliveTime(40L);
         bar.setMaxPoolSize(5);
         bar.setPoolSize(1);
         bar.setMaxQueueSize(100);
 
-        context.getExecutorServiceStrategy().registerThreadPoolProfile(bar);
+        context.getExecutorServiceManager().registerThreadPoolProfile(bar);
 
-        assertSame(foo, context.getExecutorServiceStrategy().getThreadPoolProfile("foo"));
-        assertSame(bar, context.getExecutorServiceStrategy().getThreadPoolProfile("bar"));
+        assertSame(foo, context.getExecutorServiceManager().getThreadPoolProfile("foo"));
+        assertSame(bar, context.getExecutorServiceManager().getThreadPoolProfile("bar"));
         assertNotSame(foo, bar);
 
-        assertFalse(context.getExecutorServiceStrategy().getThreadPoolProfile("foo").isDefaultProfile());
-        assertFalse(context.getExecutorServiceStrategy().getThreadPoolProfile("bar").isDefaultProfile());
+        assertFalse(context.getExecutorServiceManager().getThreadPoolProfile("foo").isDefaultProfile());
+        assertFalse(context.getExecutorServiceManager().getThreadPoolProfile("bar").isDefaultProfile());
     }
 
     public void testGetThreadPoolProfileInheritDefaultValues() throws Exception {
-        assertNull(context.getExecutorServiceStrategy().getThreadPoolProfile("foo"));
-        ThreadPoolProfileSupport foo = new ThreadPoolProfileSupport("foo");
+        assertNull(context.getExecutorServiceManager().getThreadPoolProfile("fooProfile"));
+        ThreadPoolProfile foo = new ThreadPoolProfile("fooProfile");
         foo.setMaxPoolSize(40);
-        context.getExecutorServiceStrategy().registerThreadPoolProfile(foo);
-        assertSame(foo, context.getExecutorServiceStrategy().getThreadPoolProfile("foo"));
+        context.getExecutorServiceManager().registerThreadPoolProfile(foo);
+        assertSame(foo, context.getExecutorServiceManager().getThreadPoolProfile("fooProfile"));
 
-        ExecutorService executor = context.getExecutorServiceStrategy().newThreadPool(this, "MyPool", "foo");
+        ExecutorService executor = context.getExecutorServiceManager().getDefaultExecutorService("fooProfile", this);
         ThreadPoolExecutor tp = assertIsInstanceOf(ThreadPoolExecutor.class, executor);
         assertEquals(40, tp.getMaximumPoolSize());
         // should inherit the default values
@@ -238,22 +245,22 @@ public class DefaultExecutorServiceStrat
     }
 
     public void testGetThreadPoolProfileInheritCustomDefaultValues() throws Exception {
-        ThreadPoolProfileSupport newDefault = new ThreadPoolProfileSupport("newDefault");
+        ThreadPoolProfile newDefault = new ThreadPoolProfile("newDefault");
         newDefault.setKeepAliveTime(30L);
         newDefault.setMaxPoolSize(50);
         newDefault.setPoolSize(5);
         newDefault.setMaxQueueSize(2000);
         newDefault.setRejectedPolicy(ThreadPoolRejectedPolicy.Abort);
-        context.getExecutorServiceStrategy().setDefaultThreadPoolProfile(newDefault);
+        context.getExecutorServiceManager().setDefaultThreadPoolProfile(newDefault);
 
-        assertNull(context.getExecutorServiceStrategy().getThreadPoolProfile("foo"));
-        ThreadPoolProfileSupport foo = new ThreadPoolProfileSupport("foo");
+        assertNull(context.getExecutorServiceManager().getThreadPoolProfile("foo"));
+        ThreadPoolProfile foo = new ThreadPoolProfile("foo");
         foo.setMaxPoolSize(25);
         foo.setPoolSize(1);
-        context.getExecutorServiceStrategy().registerThreadPoolProfile(foo);
-        assertSame(foo, context.getExecutorServiceStrategy().getThreadPoolProfile("foo"));
+        context.getExecutorServiceManager().registerThreadPoolProfile(foo);
+        assertSame(foo, context.getExecutorServiceManager().getThreadPoolProfile("foo"));
 
-        ExecutorService executor = context.getExecutorServiceStrategy().newThreadPool(this, "MyPool", "foo");
+        ExecutorService executor = context.getExecutorServiceManager().getDefaultExecutorService("foo", this);
 
         ThreadPoolExecutor tp = assertIsInstanceOf(ThreadPoolExecutor.class, executor);
         assertEquals(25, tp.getMaximumPoolSize());
@@ -264,18 +271,18 @@ public class DefaultExecutorServiceStrat
     }
 
     public void testGetThreadPoolProfileInheritCustomDefaultValues2() throws Exception {
-        ThreadPoolProfileSupport newDefault = new ThreadPoolProfileSupport("newDefault");
+        ThreadPoolProfile newDefault = new ThreadPoolProfile("newDefault");
         // just change the max pool as the default profile should then inherit the old default profile
         newDefault.setMaxPoolSize(50);
-        context.getExecutorServiceStrategy().setDefaultThreadPoolProfile(newDefault);
+        context.getExecutorServiceManager().setDefaultThreadPoolProfile(newDefault);
 
-        assertNull(context.getExecutorServiceStrategy().getThreadPoolProfile("foo"));
-        ThreadPoolProfileSupport foo = new ThreadPoolProfileSupport("foo");
+        assertNull(context.getExecutorServiceManager().getThreadPoolProfile("foo"));
+        ThreadPoolProfile foo = new ThreadPoolProfile("foo");
         foo.setPoolSize(1);
-        context.getExecutorServiceStrategy().registerThreadPoolProfile(foo);
-        assertSame(foo, context.getExecutorServiceStrategy().getThreadPoolProfile("foo"));
+        context.getExecutorServiceManager().registerThreadPoolProfile(foo);
+        assertSame(foo, context.getExecutorServiceManager().getThreadPoolProfile("foo"));
 
-        ExecutorService executor = context.getExecutorServiceStrategy().newThreadPool(this, "MyPool", "foo");
+        ExecutorService executor = context.getExecutorServiceManager().getDefaultExecutorService("foo", this);
 
         ThreadPoolExecutor tp = assertIsInstanceOf(ThreadPoolExecutor.class, executor);
         assertEquals(1, tp.getCorePoolSize());
@@ -286,17 +293,17 @@ public class DefaultExecutorServiceStrat
     }
 
     public void testNewThreadPoolProfile() throws Exception {
-        assertNull(context.getExecutorServiceStrategy().getThreadPoolProfile("foo"));
+        assertNull(context.getExecutorServiceManager().getThreadPoolProfile("foo"));
 
-        ThreadPoolProfileSupport foo = new ThreadPoolProfileSupport("foo");
+        ThreadPoolProfile foo = new ThreadPoolProfile("foo");
         foo.setKeepAliveTime(20L);
         foo.setMaxPoolSize(40);
         foo.setPoolSize(5);
         foo.setMaxQueueSize(2000);
 
-        context.getExecutorServiceStrategy().registerThreadPoolProfile(foo);
+        context.getExecutorServiceManager().registerThreadPoolProfile(foo);
 
-        ExecutorService pool = context.getExecutorServiceStrategy().newThreadPool(this, "Cool", "foo");
+        ExecutorService pool = context.getExecutorServiceManager().getDefaultExecutorService("foo", this);
         assertNotNull(pool);
 
         ThreadPoolExecutor tp = assertIsInstanceOf(ThreadPoolExecutor.class, pool);
@@ -311,21 +318,15 @@ public class DefaultExecutorServiceStrat
     }
 
     public void testLookupThreadPoolProfile() throws Exception {
-        ExecutorService pool = context.getExecutorServiceStrategy().lookup(this, "Cool", "fooProfile");
-        // does not exists yet
-        assertNull(pool);
-
-        assertNull(context.getExecutorServiceStrategy().getThreadPoolProfile("fooProfile"));
-
-        ThreadPoolProfileSupport foo = new ThreadPoolProfileSupport("fooProfile");
+        ThreadPoolProfile foo = new ThreadPoolProfile("fooProfile");
         foo.setKeepAliveTime(20L);
         foo.setMaxPoolSize(40);
         foo.setPoolSize(5);
         foo.setMaxQueueSize(2000);
 
-        context.getExecutorServiceStrategy().registerThreadPoolProfile(foo);
+        context.getExecutorServiceManager().registerThreadPoolProfile(foo);
 
-        pool = context.getExecutorServiceStrategy().lookup(this, "Cool", "fooProfile");
+        Object pool = context.getExecutorServiceManager().getDefaultExecutorService("fooProfile", this);
         assertNotNull(pool);
 
         ThreadPoolExecutor tp = assertIsInstanceOf(ThreadPoolExecutor.class, pool);

Propchange: camel/trunk/camel-core/src/test/java/org/apache/camel/impl/DefaultExecutorServiceManagerTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: camel/trunk/camel-core/src/test/java/org/apache/camel/impl/DefaultExecutorServiceManagerTest.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Modified: camel/trunk/camel-core/src/test/java/org/apache/camel/impl/DefaultProducerTemplateAsyncTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/test/java/org/apache/camel/impl/DefaultProducerTemplateAsyncTest.java?rev=1151762&r1=1151761&r2=1151762&view=diff
==============================================================================
--- camel/trunk/camel-core/src/test/java/org/apache/camel/impl/DefaultProducerTemplateAsyncTest.java (original)
+++ camel/trunk/camel-core/src/test/java/org/apache/camel/impl/DefaultProducerTemplateAsyncTest.java Thu Jul 28 08:39:35 2011
@@ -19,23 +19,17 @@ package org.apache.camel.impl;
 import java.util.HashMap;
 import java.util.Map;
 import java.util.concurrent.CountDownLatch;
-import java.util.concurrent.ExecutorService;
-import java.util.concurrent.Executors;
 import java.util.concurrent.Future;
 import java.util.concurrent.TimeUnit;
 import java.util.concurrent.atomic.AtomicInteger;
 
 import org.apache.camel.ContextTestSupport;
-import org.apache.camel.Endpoint;
 import org.apache.camel.Exchange;
 import org.apache.camel.ExchangePattern;
 import org.apache.camel.Processor;
-import org.apache.camel.Producer;
 import org.apache.camel.RuntimeCamelException;
 import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.component.mock.MockEndpoint;
-import org.apache.camel.util.AsyncProcessorHelper;
-import org.apache.camel.util.CastUtils;
 
 /**
  * @version 

Modified: camel/trunk/camel-core/src/test/java/org/apache/camel/impl/InflightRepositoryRouteTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/test/java/org/apache/camel/impl/InflightRepositoryRouteTest.java?rev=1151762&r1=1151761&r2=1151762&view=diff
==============================================================================
--- camel/trunk/camel-core/src/test/java/org/apache/camel/impl/InflightRepositoryRouteTest.java (original)
+++ camel/trunk/camel-core/src/test/java/org/apache/camel/impl/InflightRepositoryRouteTest.java Thu Jul 28 08:39:35 2011
@@ -16,8 +16,6 @@
  */
 package org.apache.camel.impl;
 
-import java.util.concurrent.CountDownLatch;
-
 import org.apache.camel.ContextTestSupport;
 import org.apache.camel.Exchange;
 import org.apache.camel.builder.RouteBuilder;

Modified: camel/trunk/camel-core/src/test/java/org/apache/camel/impl/MultipleLifecycleStrategyTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/test/java/org/apache/camel/impl/MultipleLifecycleStrategyTest.java?rev=1151762&r1=1151761&r2=1151762&view=diff
==============================================================================
--- camel/trunk/camel-core/src/test/java/org/apache/camel/impl/MultipleLifecycleStrategyTest.java (original)
+++ camel/trunk/camel-core/src/test/java/org/apache/camel/impl/MultipleLifecycleStrategyTest.java Thu Jul 28 08:39:35 2011
@@ -16,6 +16,9 @@
  */
 package org.apache.camel.impl;
 
+import java.util.Arrays;
+import java.util.List;
+
 import org.apache.camel.CamelContext;
 import org.apache.camel.Component;
 import org.apache.camel.TestSupport;
@@ -37,46 +40,21 @@ public class MultipleLifecycleStrategyTe
         return context;
     }
 
-    public void testMultipleLifecycle() throws Exception {
+    public void testMultipleLifecycleStrategies() throws Exception {
         CamelContext context = createCamelContext();
         context.start();
 
         Component log = new LogComponent();
         context.addComponent("log", log);
-
         context.addEndpoint("log:/foo", log.createEndpoint("log://foo"));
-
         context.removeComponent("log");
-
         context.stop();
 
-        assertEquals(12, dummy1.getEvents().size());
-        assertEquals(12, dummy2.getEvents().size());
-
-        assertEquals("onContextStart", dummy1.getEvents().get(0));
-        assertEquals("onContextStart", dummy2.getEvents().get(0));
-        assertEquals("onServiceAdd", dummy1.getEvents().get(1));
-        assertEquals("onServiceAdd", dummy2.getEvents().get(1));
-        assertEquals("onServiceAdd", dummy1.getEvents().get(2));
-        assertEquals("onServiceAdd", dummy2.getEvents().get(2));
-        assertEquals("onServiceAdd", dummy1.getEvents().get(3));
-        assertEquals("onServiceAdd", dummy2.getEvents().get(3));
-        assertEquals("onServiceAdd", dummy1.getEvents().get(4));
-        assertEquals("onServiceAdd", dummy2.getEvents().get(4));
-        assertEquals("onServiceAdd", dummy1.getEvents().get(5));
-        assertEquals("onServiceAdd", dummy2.getEvents().get(5));
-        assertEquals("onServiceAdd", dummy1.getEvents().get(6));
-        assertEquals("onServiceAdd", dummy2.getEvents().get(6));
-        assertEquals("onServiceAdd", dummy1.getEvents().get(7));
-        assertEquals("onServiceAdd", dummy2.getEvents().get(7));
-        assertEquals("onComponentAdd", dummy1.getEvents().get(8));
-        assertEquals("onComponentAdd", dummy2.getEvents().get(8));
-        assertEquals("onEndpointAdd", dummy1.getEvents().get(9));
-        assertEquals("onEndpointAdd", dummy2.getEvents().get(9));
-        assertEquals("onComponentRemove", dummy1.getEvents().get(10));
-        assertEquals("onComponentRemove", dummy2.getEvents().get(10));
-        assertEquals("onContextStop", dummy1.getEvents().get(11));
-        assertEquals("onContextStop", dummy2.getEvents().get(11));
+        List<String> expectedEvents = Arrays.asList("onContextStart", "onServiceAdd", "onServiceAdd", "onServiceAdd", "onServiceAdd", "onServiceAdd", 
+             "onServiceAdd", "onServiceAdd", "onComponentAdd", "onEndpointAdd", "onComponentRemove", "onThreadPoolAdd", "onContextStop"); 
+        
+        assertEquals(expectedEvents, dummy1.getEvents());
+        assertEquals(expectedEvents, dummy2.getEvents());
     }
 
 }

Modified: camel/trunk/camel-core/src/test/java/org/apache/camel/impl/RouteRemove2Test.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/test/java/org/apache/camel/impl/RouteRemove2Test.java?rev=1151762&r1=1151761&r2=1151762&view=diff
==============================================================================
--- camel/trunk/camel-core/src/test/java/org/apache/camel/impl/RouteRemove2Test.java (original)
+++ camel/trunk/camel-core/src/test/java/org/apache/camel/impl/RouteRemove2Test.java Thu Jul 28 08:39:35 2011
@@ -18,7 +18,6 @@ package org.apache.camel.impl;
 
 import org.apache.camel.ContextTestSupport;
 import org.apache.camel.builder.RouteBuilder;
-import org.apache.camel.component.mock.MockEndpoint;
 
 /**
  * @version 

Modified: camel/trunk/camel-core/src/test/java/org/apache/camel/issues/NeilSplitterTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/test/java/org/apache/camel/issues/NeilSplitterTest.java?rev=1151762&r1=1151761&r2=1151762&view=diff
==============================================================================
--- camel/trunk/camel-core/src/test/java/org/apache/camel/issues/NeilSplitterTest.java (original)
+++ camel/trunk/camel-core/src/test/java/org/apache/camel/issues/NeilSplitterTest.java Thu Jul 28 08:39:35 2011
@@ -26,7 +26,6 @@ import org.apache.camel.Processor;
 import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.component.mock.MockEndpoint;
 import org.apache.camel.impl.ExpressionAdapter;
-import static org.apache.camel.builder.xml.XPathBuilder.xpath;
 
 /**
  * @version 

Modified: camel/trunk/camel-core/src/test/java/org/apache/camel/issues/SplitWithCustomAggregationStrategyTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/test/java/org/apache/camel/issues/SplitWithCustomAggregationStrategyTest.java?rev=1151762&r1=1151761&r2=1151762&view=diff
==============================================================================
--- camel/trunk/camel-core/src/test/java/org/apache/camel/issues/SplitWithCustomAggregationStrategyTest.java (original)
+++ camel/trunk/camel-core/src/test/java/org/apache/camel/issues/SplitWithCustomAggregationStrategyTest.java Thu Jul 28 08:39:35 2011
@@ -21,7 +21,6 @@ import org.apache.camel.Exchange;
 import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.component.mock.MockEndpoint;
 import org.apache.camel.processor.aggregate.AggregationStrategy;
-import static org.apache.camel.builder.xml.XPathBuilder.xpath;
 
 /**
  * @version 

Modified: camel/trunk/camel-core/src/test/java/org/apache/camel/issues/XPathSplitStreamTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/test/java/org/apache/camel/issues/XPathSplitStreamTest.java?rev=1151762&r1=1151761&r2=1151762&view=diff
==============================================================================
--- camel/trunk/camel-core/src/test/java/org/apache/camel/issues/XPathSplitStreamTest.java (original)
+++ camel/trunk/camel-core/src/test/java/org/apache/camel/issues/XPathSplitStreamTest.java Thu Jul 28 08:39:35 2011
@@ -23,8 +23,6 @@ import org.apache.camel.Exchange;
 import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.component.mock.MockEndpoint;
 
-import static org.apache.camel.builder.xml.XPathBuilder.xpath;
-
 /**
  * @version 
  */

Modified: camel/trunk/camel-core/src/test/java/org/apache/camel/language/BeanLanguageInvalidOGNLTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/test/java/org/apache/camel/language/BeanLanguageInvalidOGNLTest.java?rev=1151762&r1=1151761&r2=1151762&view=diff
==============================================================================
--- camel/trunk/camel-core/src/test/java/org/apache/camel/language/BeanLanguageInvalidOGNLTest.java (original)
+++ camel/trunk/camel-core/src/test/java/org/apache/camel/language/BeanLanguageInvalidOGNLTest.java Thu Jul 28 08:39:35 2011
@@ -25,7 +25,6 @@ import org.apache.camel.ExpressionIllega
 import org.apache.camel.RuntimeCamelException;
 import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.component.bean.MethodNotFoundException;
-import org.apache.camel.language.bean.RuntimeBeanExpressionException;
 
 /**
  * @version 

Modified: camel/trunk/camel-core/src/test/java/org/apache/camel/management/DualManagedThreadPoolProfileTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/test/java/org/apache/camel/management/DualManagedThreadPoolProfileTest.java?rev=1151762&r1=1151761&r2=1151762&view=diff
==============================================================================
--- camel/trunk/camel-core/src/test/java/org/apache/camel/management/DualManagedThreadPoolProfileTest.java (original)
+++ camel/trunk/camel-core/src/test/java/org/apache/camel/management/DualManagedThreadPoolProfileTest.java Thu Jul 28 08:39:35 2011
@@ -21,7 +21,6 @@ import javax.management.ObjectName;
 
 import org.apache.camel.ThreadPoolRejectedPolicy;
 import org.apache.camel.builder.RouteBuilder;
-import org.apache.camel.impl.ThreadPoolProfileSupport;
 import org.apache.camel.spi.ThreadPoolProfile;
 
 /**
@@ -78,14 +77,14 @@ public class DualManagedThreadPoolProfil
         return new RouteBuilder() {
             @Override
             public void configure() throws Exception {
-                ThreadPoolProfile profile = new ThreadPoolProfileSupport("custom");
+                ThreadPoolProfile profile = new ThreadPoolProfile("custom");
                 profile.setPoolSize(5);
                 profile.setMaxPoolSize(15);
                 profile.setKeepAliveTime(25L);
                 profile.setMaxQueueSize(250);
                 profile.setRejectedPolicy(ThreadPoolRejectedPolicy.Abort);
 
-                context.getExecutorServiceStrategy().registerThreadPoolProfile(profile);
+                context.getExecutorServiceManager().registerThreadPoolProfile(profile);
 
                 from("direct:start").threads().executorServiceRef("custom").to("mock:result");
 

Modified: camel/trunk/camel-core/src/test/java/org/apache/camel/management/ManagedThreadPoolProfileTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/test/java/org/apache/camel/management/ManagedThreadPoolProfileTest.java?rev=1151762&r1=1151761&r2=1151762&view=diff
==============================================================================
--- camel/trunk/camel-core/src/test/java/org/apache/camel/management/ManagedThreadPoolProfileTest.java (original)
+++ camel/trunk/camel-core/src/test/java/org/apache/camel/management/ManagedThreadPoolProfileTest.java Thu Jul 28 08:39:35 2011
@@ -16,12 +16,14 @@
  */
 package org.apache.camel.management;
 
+import java.util.concurrent.TimeUnit;
+
 import javax.management.MBeanServer;
 import javax.management.ObjectName;
 
 import org.apache.camel.ThreadPoolRejectedPolicy;
 import org.apache.camel.builder.RouteBuilder;
-import org.apache.camel.impl.ThreadPoolProfileSupport;
+import org.apache.camel.builder.ThreadPoolBuilder;
 import org.apache.camel.spi.ThreadPoolProfile;
 
 /**
@@ -72,14 +74,15 @@ public class ManagedThreadPoolProfileTes
         return new RouteBuilder() {
             @Override
             public void configure() throws Exception {
-                ThreadPoolProfile profile = new ThreadPoolProfileSupport("custom");
-                profile.setPoolSize(5);
-                profile.setMaxPoolSize(15);
-                profile.setKeepAliveTime(25L);
-                profile.setMaxQueueSize(250);
-                profile.setRejectedPolicy(ThreadPoolRejectedPolicy.Abort);
+                ThreadPoolProfile profile = new ThreadPoolBuilder("custom")
+                    .poolSize(5)
+                    .maxPoolSize(15)
+                    .keepAliveTime(25, TimeUnit.SECONDS)
+                    .maxQueueSize(250)
+                    .rejectedPolicy(ThreadPoolRejectedPolicy.Abort)
+                    .build();
 
-                context.getExecutorServiceStrategy().registerThreadPoolProfile(profile);
+                context.getExecutorServiceManager().registerThreadPoolProfile(profile);
 
                 from("direct:start").threads().executorServiceRef("custom").to("mock:result");
             }

Modified: camel/trunk/camel-core/src/test/java/org/apache/camel/management/ManagedUnregisterConsumerTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/test/java/org/apache/camel/management/ManagedUnregisterConsumerTest.java?rev=1151762&r1=1151761&r2=1151762&view=diff
==============================================================================
--- camel/trunk/camel-core/src/test/java/org/apache/camel/management/ManagedUnregisterConsumerTest.java (original)
+++ camel/trunk/camel-core/src/test/java/org/apache/camel/management/ManagedUnregisterConsumerTest.java Thu Jul 28 08:39:35 2011
@@ -20,11 +20,8 @@ import java.util.Set;
 import javax.management.MBeanServer;
 import javax.management.ObjectName;
 
-import org.apache.camel.CamelContext;
-import org.apache.camel.ContextTestSupport;
 import org.apache.camel.ServiceStatus;
 import org.apache.camel.builder.RouteBuilder;
-import org.apache.camel.impl.DefaultCamelContext;
 
 /**
  * @version 

Modified: camel/trunk/camel-core/src/test/java/org/apache/camel/model/StartingRoutesErrorReportedTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/test/java/org/apache/camel/model/StartingRoutesErrorReportedTest.java?rev=1151762&r1=1151761&r2=1151762&view=diff
==============================================================================
--- camel/trunk/camel-core/src/test/java/org/apache/camel/model/StartingRoutesErrorReportedTest.java (original)
+++ camel/trunk/camel-core/src/test/java/org/apache/camel/model/StartingRoutesErrorReportedTest.java Thu Jul 28 08:39:35 2011
@@ -19,8 +19,6 @@ package org.apache.camel.model;
 import org.apache.camel.ContextTestSupport;
 import org.apache.camel.FailedToCreateRouteException;
 import org.apache.camel.builder.RouteBuilder;
-import org.apache.camel.impl.JndiRegistry;
-import org.apache.camel.spi.DataFormat;
 
 /**
  * @version 

Modified: camel/trunk/camel-core/src/test/java/org/apache/camel/processor/BeanRecipientListNoMethodNameTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/BeanRecipientListNoMethodNameTest.java?rev=1151762&r1=1151761&r2=1151762&view=diff
==============================================================================
--- camel/trunk/camel-core/src/test/java/org/apache/camel/processor/BeanRecipientListNoMethodNameTest.java (original)
+++ camel/trunk/camel-core/src/test/java/org/apache/camel/processor/BeanRecipientListNoMethodNameTest.java Thu Jul 28 08:39:35 2011
@@ -16,14 +16,7 @@
  */
 package org.apache.camel.processor;
 
-import java.util.concurrent.atomic.AtomicInteger;
-import javax.naming.Context;
-
-import org.apache.camel.ContextTestSupport;
 import org.apache.camel.builder.RouteBuilder;
-import org.apache.camel.util.jndi.JndiContext;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 
 /**
  * @version 

Modified: camel/trunk/camel-core/src/test/java/org/apache/camel/processor/BreadcrumbTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/BreadcrumbTest.java?rev=1151762&r1=1151761&r2=1151762&view=diff
==============================================================================
--- camel/trunk/camel-core/src/test/java/org/apache/camel/processor/BreadcrumbTest.java (original)
+++ camel/trunk/camel-core/src/test/java/org/apache/camel/processor/BreadcrumbTest.java Thu Jul 28 08:39:35 2011
@@ -19,7 +19,6 @@ package org.apache.camel.processor;
 import org.apache.camel.Exchange;
 import org.apache.camel.Processor;
 import org.apache.camel.builder.RouteBuilder;
-import org.slf4j.MDC;
 
 /**
  * @version 

Modified: camel/trunk/camel-core/src/test/java/org/apache/camel/processor/FlipRoutePolicy.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/FlipRoutePolicy.java?rev=1151762&r1=1151761&r2=1151762&view=diff
==============================================================================
--- camel/trunk/camel-core/src/test/java/org/apache/camel/processor/FlipRoutePolicy.java (original)
+++ camel/trunk/camel-core/src/test/java/org/apache/camel/processor/FlipRoutePolicy.java Thu Jul 28 08:39:35 2011
@@ -16,8 +16,6 @@
  */
 package org.apache.camel.processor;
 
-import java.util.concurrent.TimeUnit;
-
 import org.apache.camel.CamelContext;
 import org.apache.camel.Exchange;
 import org.apache.camel.Route;

Modified: camel/trunk/camel-core/src/test/java/org/apache/camel/processor/OnCompletionAsyncTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/OnCompletionAsyncTest.java?rev=1151762&r1=1151761&r2=1151762&view=diff
==============================================================================
--- camel/trunk/camel-core/src/test/java/org/apache/camel/processor/OnCompletionAsyncTest.java (original)
+++ camel/trunk/camel-core/src/test/java/org/apache/camel/processor/OnCompletionAsyncTest.java Thu Jul 28 08:39:35 2011
@@ -23,8 +23,6 @@ import org.apache.camel.Processor;
 import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.component.mock.MockEndpoint;
 
-import static org.apache.camel.language.simple.SimpleLanguage.simple;
-
 /**
  * @version 
  */

Modified: camel/trunk/camel-core/src/test/java/org/apache/camel/processor/OnCompletionUseOriginalBodyTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/OnCompletionUseOriginalBodyTest.java?rev=1151762&r1=1151761&r2=1151762&view=diff
==============================================================================
--- camel/trunk/camel-core/src/test/java/org/apache/camel/processor/OnCompletionUseOriginalBodyTest.java (original)
+++ camel/trunk/camel-core/src/test/java/org/apache/camel/processor/OnCompletionUseOriginalBodyTest.java Thu Jul 28 08:39:35 2011
@@ -22,8 +22,6 @@ import org.apache.camel.Processor;
 import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.component.mock.MockEndpoint;
 
-import static org.apache.camel.language.simple.SimpleLanguage.simple;
-
 /**
  * @version 
  */

Modified: camel/trunk/camel-core/src/test/java/org/apache/camel/processor/RecipeientListWithSimpleExpressionTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/RecipeientListWithSimpleExpressionTest.java?rev=1151762&r1=1151761&r2=1151762&view=diff
==============================================================================
--- camel/trunk/camel-core/src/test/java/org/apache/camel/processor/RecipeientListWithSimpleExpressionTest.java (original)
+++ camel/trunk/camel-core/src/test/java/org/apache/camel/processor/RecipeientListWithSimpleExpressionTest.java Thu Jul 28 08:39:35 2011
@@ -22,7 +22,6 @@ import java.util.concurrent.Executors;
 import org.apache.camel.ContextTestSupport;
 import org.apache.camel.Header;
 import org.apache.camel.builder.RouteBuilder;
-import static org.apache.camel.language.simple.SimpleLanguage.simple;
 
 /**
  * @version 

Modified: camel/trunk/camel-core/src/test/java/org/apache/camel/processor/RecipientListIgnoreInvalidEndpointsTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/RecipientListIgnoreInvalidEndpointsTest.java?rev=1151762&r1=1151761&r2=1151762&view=diff
==============================================================================
--- camel/trunk/camel-core/src/test/java/org/apache/camel/processor/RecipientListIgnoreInvalidEndpointsTest.java (original)
+++ camel/trunk/camel-core/src/test/java/org/apache/camel/processor/RecipientListIgnoreInvalidEndpointsTest.java Thu Jul 28 08:39:35 2011
@@ -22,8 +22,6 @@ import org.apache.camel.ResolveEndpointF
 import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.component.mock.MockEndpoint;
 
-import static org.apache.camel.language.simple.SimpleLanguage.simple;
-
 public class RecipientListIgnoreInvalidEndpointsTest extends ContextTestSupport {
 
     public void testRecipientListWithIgnoreInvalidEndpointsOption() throws Exception {

Modified: camel/trunk/camel-core/src/test/java/org/apache/camel/processor/RecipientListParallelAggregateThreadPoolIssueTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/RecipientListParallelAggregateThreadPoolIssueTest.java?rev=1151762&r1=1151761&r2=1151762&view=diff
==============================================================================
--- camel/trunk/camel-core/src/test/java/org/apache/camel/processor/RecipientListParallelAggregateThreadPoolIssueTest.java (original)
+++ camel/trunk/camel-core/src/test/java/org/apache/camel/processor/RecipientListParallelAggregateThreadPoolIssueTest.java Thu Jul 28 08:39:35 2011
@@ -26,7 +26,7 @@ import org.apache.camel.component.mock.M
 public class RecipientListParallelAggregateThreadPoolIssueTest extends ContextTestSupport {
 
     public void testRecipientListParallelALot() throws Exception {
-        String before = context.getExecutorServiceStrategy().getThreadName("foo");
+        String before = context.getExecutorServiceManager().resolveThreadName("foo");
 
         for (int i = 0; i < 10; i++) {
             MockEndpoint mock = getMockEndpoint("mock:result");
@@ -38,7 +38,7 @@ public class RecipientListParallelAggreg
             assertMockEndpointsSatisfied();
         }
 
-        String after = context.getExecutorServiceStrategy().getThreadName("foo");
+        String after = context.getExecutorServiceManager().resolveThreadName("foo");
         int num1 = context.getTypeConverter().convertTo(int.class, before);
         int num2 = context.getTypeConverter().convertTo(int.class, after);
         int diff = num2 - num1;
@@ -52,7 +52,7 @@ public class RecipientListParallelAggreg
         return new RouteBuilder() {
             @Override
             public void configure() throws Exception {
-                context.getExecutorServiceStrategy().setThreadNamePattern("${counter}");
+                context.getExecutorServiceManager().setThreadNamePattern("${counter}");
 
                 from("direct:start")
                         .recipientList(header("foo")).parallelProcessing();

Modified: camel/trunk/camel-core/src/test/java/org/apache/camel/processor/RoutePerformanceTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/RoutePerformanceTest.java?rev=1151762&r1=1151761&r2=1151762&view=diff
==============================================================================
--- camel/trunk/camel-core/src/test/java/org/apache/camel/processor/RoutePerformanceTest.java (original)
+++ camel/trunk/camel-core/src/test/java/org/apache/camel/processor/RoutePerformanceTest.java Thu Jul 28 08:39:35 2011
@@ -32,7 +32,7 @@ import org.apache.camel.util.StopWatch;
  * something is wrong. Inspired by end user on forum doing this as proof of concept.
  */
 public class RoutePerformanceTest extends ContextTestSupport {
-
+    
     private int size = 250;
     private SimpleDataSet dataSet = new SimpleDataSet(size);
     private String uri = "mock:results";
@@ -47,7 +47,7 @@ public class RoutePerformanceTest extend
         // wait 30 sec for slow servers
         MockEndpoint.assertIsSatisfied(context, 30, TimeUnit.SECONDS);
 
-        System.out.println("RoutePerformanceTest: Sent: " + size + " Took: " + watch.taken() + " ms");
+        log.info("RoutePerformanceTest: Sent: " + size + " Took: " + watch.taken() + " ms");
     }
 
     @Override

Modified: camel/trunk/camel-core/src/test/java/org/apache/camel/processor/SetBodyProcessorTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/SetBodyProcessorTest.java?rev=1151762&r1=1151761&r2=1151762&view=diff
==============================================================================
--- camel/trunk/camel-core/src/test/java/org/apache/camel/processor/SetBodyProcessorTest.java (original)
+++ camel/trunk/camel-core/src/test/java/org/apache/camel/processor/SetBodyProcessorTest.java Thu Jul 28 08:39:35 2011
@@ -24,8 +24,6 @@ import org.apache.camel.builder.RouteBui
 import org.apache.camel.component.mock.MockEndpoint;
 import org.apache.camel.impl.DefaultMessage;
 
-import static org.apache.camel.language.simple.SimpleLanguage.simple;
-
 /**
  * @version 
  */

Modified: camel/trunk/camel-core/src/test/java/org/apache/camel/processor/SetHeaderTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/SetHeaderTest.java?rev=1151762&r1=1151761&r2=1151762&view=diff
==============================================================================
--- camel/trunk/camel-core/src/test/java/org/apache/camel/processor/SetHeaderTest.java (original)
+++ camel/trunk/camel-core/src/test/java/org/apache/camel/processor/SetHeaderTest.java Thu Jul 28 08:39:35 2011
@@ -21,7 +21,6 @@ import java.util.List;
 import org.apache.camel.ContextTestSupport;
 import org.apache.camel.Exchange;
 import org.apache.camel.builder.RouteBuilder;
-import org.apache.camel.builder.xml.Namespaces;
 import org.apache.camel.component.mock.MockEndpoint;
 
 /**

Modified: camel/trunk/camel-core/src/test/java/org/apache/camel/processor/ShutdownSedaAndDirectEndpointTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/ShutdownSedaAndDirectEndpointTest.java?rev=1151762&r1=1151761&r2=1151762&view=diff
==============================================================================
--- camel/trunk/camel-core/src/test/java/org/apache/camel/processor/ShutdownSedaAndDirectEndpointTest.java (original)
+++ camel/trunk/camel-core/src/test/java/org/apache/camel/processor/ShutdownSedaAndDirectEndpointTest.java Thu Jul 28 08:39:35 2011
@@ -20,8 +20,6 @@ import org.apache.camel.ContextTestSuppo
 import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.component.mock.MockEndpoint;
 
-import static org.apache.camel.ShutdownRoute.Defer;
-
 /**
  * @version 
  */

Modified: camel/trunk/camel-core/src/test/java/org/apache/camel/processor/SimulatorTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/SimulatorTest.java?rev=1151762&r1=1151761&r2=1151762&view=diff
==============================================================================
--- camel/trunk/camel-core/src/test/java/org/apache/camel/processor/SimulatorTest.java (original)
+++ camel/trunk/camel-core/src/test/java/org/apache/camel/processor/SimulatorTest.java Thu Jul 28 08:39:35 2011
@@ -27,8 +27,6 @@ import org.apache.camel.builder.RouteBui
 import org.apache.camel.util.ExchangeHelper;
 import org.apache.camel.util.jndi.JndiContext;
 
-import static org.apache.camel.language.simple.SimpleLanguage.simple;
-
 /**
  * @version 
  */

Modified: camel/trunk/camel-core/src/test/java/org/apache/camel/processor/SplitterNoAggregationStrategyTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/SplitterNoAggregationStrategyTest.java?rev=1151762&r1=1151761&r2=1151762&view=diff
==============================================================================
--- camel/trunk/camel-core/src/test/java/org/apache/camel/processor/SplitterNoAggregationStrategyTest.java (original)
+++ camel/trunk/camel-core/src/test/java/org/apache/camel/processor/SplitterNoAggregationStrategyTest.java Thu Jul 28 08:39:35 2011
@@ -16,7 +16,6 @@
  */
 package org.apache.camel.processor;
 
-import org.apache.camel.CamelExchangeException;
 import org.apache.camel.CamelExecutionException;
 import org.apache.camel.ContextTestSupport;
 import org.apache.camel.Exchange;

Modified: camel/trunk/camel-core/src/test/java/org/apache/camel/processor/SplitterStreamingUoWIssueTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/SplitterStreamingUoWIssueTest.java?rev=1151762&r1=1151761&r2=1151762&view=diff
==============================================================================
--- camel/trunk/camel-core/src/test/java/org/apache/camel/processor/SplitterStreamingUoWIssueTest.java (original)
+++ camel/trunk/camel-core/src/test/java/org/apache/camel/processor/SplitterStreamingUoWIssueTest.java Thu Jul 28 08:39:35 2011
@@ -18,7 +18,6 @@ package org.apache.camel.processor;
 
 import org.apache.camel.ContextTestSupport;
 import org.apache.camel.Exchange;
-import org.apache.camel.Processor;
 import org.apache.camel.builder.RouteBuilder;
 
 /**

Modified: camel/trunk/camel-core/src/test/java/org/apache/camel/processor/SplitterUoWIssueTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/SplitterUoWIssueTest.java?rev=1151762&r1=1151761&r2=1151762&view=diff
==============================================================================
--- camel/trunk/camel-core/src/test/java/org/apache/camel/processor/SplitterUoWIssueTest.java (original)
+++ camel/trunk/camel-core/src/test/java/org/apache/camel/processor/SplitterUoWIssueTest.java Thu Jul 28 08:39:35 2011
@@ -18,7 +18,6 @@ package org.apache.camel.processor;
 
 import org.apache.camel.ContextTestSupport;
 import org.apache.camel.Exchange;
-import org.apache.camel.Processor;
 import org.apache.camel.builder.RouteBuilder;
 
 /**

Modified: camel/trunk/camel-core/src/test/java/org/apache/camel/processor/ThreadsZeroInCoreAndMaxPoolTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/ThreadsZeroInCoreAndMaxPoolTest.java?rev=1151762&r1=1151761&r2=1151762&view=diff
==============================================================================
--- camel/trunk/camel-core/src/test/java/org/apache/camel/processor/ThreadsZeroInCoreAndMaxPoolTest.java (original)
+++ camel/trunk/camel-core/src/test/java/org/apache/camel/processor/ThreadsZeroInCoreAndMaxPoolTest.java Thu Jul 28 08:39:35 2011
@@ -44,11 +44,9 @@ public class ThreadsZeroInCoreAndMaxPool
                         .threads(0, 2).to("mock:result");
                 }
             });
-            // expect to get the IllegalArgumentException
-            fail("Except the exception here");
+            fail("Expect FailedToCreateRouteException exception here");
         } catch (FailedToCreateRouteException ex) {
             assertTrue(ex.getCause() instanceof IllegalArgumentException);
-
         }
     }
 

Modified: camel/trunk/camel-core/src/test/java/org/apache/camel/processor/WeightedRandomLoadBalanceTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/WeightedRandomLoadBalanceTest.java?rev=1151762&r1=1151761&r2=1151762&view=diff
==============================================================================
--- camel/trunk/camel-core/src/test/java/org/apache/camel/processor/WeightedRandomLoadBalanceTest.java (original)
+++ camel/trunk/camel-core/src/test/java/org/apache/camel/processor/WeightedRandomLoadBalanceTest.java Thu Jul 28 08:39:35 2011
@@ -16,7 +16,6 @@
  */
 package org.apache.camel.processor;
 
-import org.apache.camel.CamelException;
 import org.apache.camel.ContextTestSupport;
 import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.component.mock.MockEndpoint;

Modified: camel/trunk/camel-core/src/test/java/org/apache/camel/processor/WeightedRoundRobinLoadBalanceTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/WeightedRoundRobinLoadBalanceTest.java?rev=1151762&r1=1151761&r2=1151762&view=diff
==============================================================================
--- camel/trunk/camel-core/src/test/java/org/apache/camel/processor/WeightedRoundRobinLoadBalanceTest.java (original)
+++ camel/trunk/camel-core/src/test/java/org/apache/camel/processor/WeightedRoundRobinLoadBalanceTest.java Thu Jul 28 08:39:35 2011
@@ -16,7 +16,6 @@
  */
 package org.apache.camel.processor;
 
-import org.apache.camel.CamelException;
 import org.apache.camel.ContextTestSupport;
 import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.component.mock.MockEndpoint;

Modified: camel/trunk/camel-core/src/test/java/org/apache/camel/processor/WireTapUsingFireAndForgetCopyAsDefaultTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/WireTapUsingFireAndForgetCopyAsDefaultTest.java?rev=1151762&r1=1151761&r2=1151762&view=diff
==============================================================================
--- camel/trunk/camel-core/src/test/java/org/apache/camel/processor/WireTapUsingFireAndForgetCopyAsDefaultTest.java (original)
+++ camel/trunk/camel-core/src/test/java/org/apache/camel/processor/WireTapUsingFireAndForgetCopyAsDefaultTest.java Thu Jul 28 08:39:35 2011
@@ -22,8 +22,6 @@ import org.apache.camel.Processor;
 import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.component.mock.MockEndpoint;
 
-import static org.apache.camel.language.simple.SimpleLanguage.simple;
-
 /**
  * @version 
  */

Modified: camel/trunk/camel-core/src/test/java/org/apache/camel/processor/WireTapUsingFireAndForgetCopyTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/WireTapUsingFireAndForgetCopyTest.java?rev=1151762&r1=1151761&r2=1151762&view=diff
==============================================================================
--- camel/trunk/camel-core/src/test/java/org/apache/camel/processor/WireTapUsingFireAndForgetCopyTest.java (original)
+++ camel/trunk/camel-core/src/test/java/org/apache/camel/processor/WireTapUsingFireAndForgetCopyTest.java Thu Jul 28 08:39:35 2011
@@ -22,8 +22,6 @@ import org.apache.camel.Processor;
 import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.component.mock.MockEndpoint;
 
-import static org.apache.camel.language.simple.SimpleLanguage.simple;
-
 /**
  * @version 
  */

Modified: camel/trunk/camel-core/src/test/java/org/apache/camel/processor/aggregator/AggregateExpressionTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/aggregator/AggregateExpressionTest.java?rev=1151762&r1=1151761&r2=1151762&view=diff
==============================================================================
--- camel/trunk/camel-core/src/test/java/org/apache/camel/processor/aggregator/AggregateExpressionTest.java (original)
+++ camel/trunk/camel-core/src/test/java/org/apache/camel/processor/aggregator/AggregateExpressionTest.java Thu Jul 28 08:39:35 2011
@@ -16,12 +16,8 @@
  */
 package org.apache.camel.processor.aggregator;
 
-import java.util.HashMap;
-import java.util.Map;
-
 import org.apache.camel.ContextTestSupport;
 import org.apache.camel.Exchange;
-import org.apache.camel.Processor;
 import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.component.mock.MockEndpoint;
 import org.apache.camel.processor.BodyInAggregatingStrategy;

Modified: camel/trunk/camel-core/src/test/java/org/apache/camel/processor/aggregator/AggregateShutdownThreadPoolTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/aggregator/AggregateShutdownThreadPoolTest.java?rev=1151762&r1=1151761&r2=1151762&view=diff
==============================================================================
--- camel/trunk/camel-core/src/test/java/org/apache/camel/processor/aggregator/AggregateShutdownThreadPoolTest.java (original)
+++ camel/trunk/camel-core/src/test/java/org/apache/camel/processor/aggregator/AggregateShutdownThreadPoolTest.java Thu Jul 28 08:39:35 2011
@@ -94,7 +94,7 @@ public class AggregateShutdownThreadPool
         return new RouteBuilder() {
             @Override
             public void configure() throws Exception {
-                myPool = context.getExecutorServiceStrategy().newDefaultThreadPool(this, "myPool");
+                myPool = context.getExecutorServiceManager().getDefaultExecutorService("myPool", this);
 
                 from("direct:foo").routeId("foo")
                     .aggregate(header("id"), new BodyInAggregatingStrategy()).completionSize(3)

Modified: camel/trunk/camel-core/src/test/java/org/apache/camel/processor/aggregator/AggregateThreadPoolProfileTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/aggregator/AggregateThreadPoolProfileTest.java?rev=1151762&r1=1151761&r2=1151762&view=diff
==============================================================================
--- camel/trunk/camel-core/src/test/java/org/apache/camel/processor/aggregator/AggregateThreadPoolProfileTest.java (original)
+++ camel/trunk/camel-core/src/test/java/org/apache/camel/processor/aggregator/AggregateThreadPoolProfileTest.java Thu Jul 28 08:39:35 2011
@@ -19,7 +19,7 @@ package org.apache.camel.processor.aggre
 import org.apache.camel.ContextTestSupport;
 import org.apache.camel.ThreadPoolRejectedPolicy;
 import org.apache.camel.builder.RouteBuilder;
-import org.apache.camel.impl.ThreadPoolProfileSupport;
+import org.apache.camel.builder.ThreadPoolBuilder;
 import org.apache.camel.processor.BodyInAggregatingStrategy;
 import org.apache.camel.spi.ThreadPoolProfile;
 
@@ -44,11 +44,8 @@ public class AggregateThreadPoolProfileT
             @Override
             public void configure() throws Exception {
                 // create and register thread pool profile
-                ThreadPoolProfile profile = new ThreadPoolProfileSupport("myProfile");
-                profile.setPoolSize(2);
-                profile.setMaxPoolSize(8);
-                profile.setRejectedPolicy(ThreadPoolRejectedPolicy.Abort);
-                context.getExecutorServiceStrategy().registerThreadPoolProfile(profile);
+                ThreadPoolProfile profile = new ThreadPoolBuilder("myProfile").poolSize(2).maxPoolSize(8).rejectedPolicy(ThreadPoolRejectedPolicy.Abort).build();
+                context.getExecutorServiceManager().registerThreadPoolProfile(profile);
 
                 from("direct:start")
                     .aggregate(header("id"), new BodyInAggregatingStrategy())

Modified: camel/trunk/camel-core/src/test/java/org/apache/camel/processor/aggregator/AlbertoAggregatorTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/aggregator/AlbertoAggregatorTest.java?rev=1151762&r1=1151761&r2=1151762&view=diff
==============================================================================
--- camel/trunk/camel-core/src/test/java/org/apache/camel/processor/aggregator/AlbertoAggregatorTest.java (original)
+++ camel/trunk/camel-core/src/test/java/org/apache/camel/processor/aggregator/AlbertoAggregatorTest.java Thu Jul 28 08:39:35 2011
@@ -28,8 +28,6 @@ import org.apache.camel.builder.RouteBui
 import org.apache.camel.component.mock.MockEndpoint;
 import org.apache.camel.model.AggregateDefinition;
 import org.apache.camel.processor.aggregate.AggregationStrategy;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 
 /**
  * @version 

Modified: camel/trunk/camel-core/src/test/java/org/apache/camel/processor/aggregator/SplitRouteNumberOfProcessorTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/aggregator/SplitRouteNumberOfProcessorTest.java?rev=1151762&r1=1151761&r2=1151762&view=diff
==============================================================================
--- camel/trunk/camel-core/src/test/java/org/apache/camel/processor/aggregator/SplitRouteNumberOfProcessorTest.java (original)
+++ camel/trunk/camel-core/src/test/java/org/apache/camel/processor/aggregator/SplitRouteNumberOfProcessorTest.java Thu Jul 28 08:39:35 2011
@@ -21,7 +21,6 @@ import java.util.concurrent.atomic.Atomi
 import org.apache.camel.ContextTestSupport;
 import org.apache.camel.Exchange;
 import org.apache.camel.Processor;
-import org.apache.camel.ProducerTemplate;
 import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.component.mock.MockEndpoint;
 import org.apache.camel.processor.aggregate.AggregationStrategy;

Modified: camel/trunk/camel-core/src/test/java/org/apache/camel/processor/async/AsyncDeadLetterChannelExecutorServiceRefTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/async/AsyncDeadLetterChannelExecutorServiceRefTest.java?rev=1151762&r1=1151761&r2=1151762&view=diff
==============================================================================
--- camel/trunk/camel-core/src/test/java/org/apache/camel/processor/async/AsyncDeadLetterChannelExecutorServiceRefTest.java (original)
+++ camel/trunk/camel-core/src/test/java/org/apache/camel/processor/async/AsyncDeadLetterChannelExecutorServiceRefTest.java Thu Jul 28 08:39:35 2011
@@ -20,7 +20,7 @@ import org.apache.camel.ContextTestSuppo
 import org.apache.camel.Exchange;
 import org.apache.camel.Processor;
 import org.apache.camel.builder.RouteBuilder;
-import org.apache.camel.impl.ThreadPoolProfileSupport;
+import org.apache.camel.builder.ThreadPoolBuilder;
 import org.apache.camel.spi.ThreadPoolProfile;
 
 /**
@@ -39,9 +39,8 @@ public class AsyncDeadLetterChannelExecu
         context.addRoutes(new RouteBuilder() {
             @Override
             public void configure() throws Exception {
-                ThreadPoolProfile profile = new ThreadPoolProfileSupport("myAsyncPool");
-                profile.setPoolSize(5);
-                context.getExecutorServiceStrategy().registerThreadPoolProfile(profile);
+                ThreadPoolProfile profile = new ThreadPoolBuilder("myAsyncPool").poolSize(5).build();
+                context.getExecutorServiceManager().registerThreadPoolProfile(profile);
 
                 errorHandler(deadLetterChannel("mock:dead")
                         .maximumRedeliveries(2)

Modified: camel/trunk/camel-core/src/test/java/org/apache/camel/processor/async/AsyncDefaultErrorHandlerTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/async/AsyncDefaultErrorHandlerTest.java?rev=1151762&r1=1151761&r2=1151762&view=diff
==============================================================================
--- camel/trunk/camel-core/src/test/java/org/apache/camel/processor/async/AsyncDefaultErrorHandlerTest.java (original)
+++ camel/trunk/camel-core/src/test/java/org/apache/camel/processor/async/AsyncDefaultErrorHandlerTest.java Thu Jul 28 08:39:35 2011
@@ -20,7 +20,6 @@ import org.apache.camel.CamelExecutionEx
 import org.apache.camel.ContextTestSupport;
 import org.apache.camel.Exchange;
 import org.apache.camel.Processor;
-import org.apache.camel.WaitForTaskToComplete;
 import org.apache.camel.builder.RouteBuilder;
 
 /**

Modified: camel/trunk/camel-core/src/test/java/org/apache/camel/processor/async/AsyncEndpointRecipientList4Test.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/async/AsyncEndpointRecipientList4Test.java?rev=1151762&r1=1151761&r2=1151762&view=diff
==============================================================================
--- camel/trunk/camel-core/src/test/java/org/apache/camel/processor/async/AsyncEndpointRecipientList4Test.java (original)
+++ camel/trunk/camel-core/src/test/java/org/apache/camel/processor/async/AsyncEndpointRecipientList4Test.java Thu Jul 28 08:39:35 2011
@@ -26,8 +26,8 @@ import org.apache.camel.builder.RouteBui
  */
 public class AsyncEndpointRecipientList4Test extends ContextTestSupport {
 
-    private static String beforeThreadName;
-    private static String afterThreadName;
+    private static long beforeThreadId;
+    private static long afterThreadId;
 
     public void testAsyncEndpoint() throws Exception {
         getMockEndpoint("mock:before").expectedBodiesReceived("Hello Camel");
@@ -39,7 +39,7 @@ public class AsyncEndpointRecipientList4
 
         assertMockEndpointsSatisfied();
 
-        assertFalse("Should use different threads", beforeThreadName.equalsIgnoreCase(afterThreadName));
+        assertTrue("Should use different threads " + beforeThreadId + ":" + afterThreadId, beforeThreadId != afterThreadId);
     }
 
     @Override
@@ -54,7 +54,7 @@ public class AsyncEndpointRecipientList4
                         .to("log:before")
                         .process(new Processor() {
                             public void process(Exchange exchange) throws Exception {
-                                beforeThreadName = Thread.currentThread().getName();
+                                beforeThreadId = Thread.currentThread().getId();
                             }
                         })
                         .recipientList(constant("async:Hi Camel,async:Hi World,direct:foo"));
@@ -62,7 +62,7 @@ public class AsyncEndpointRecipientList4
                 from("direct:foo")
                         .process(new Processor() {
                             public void process(Exchange exchange) throws Exception {
-                                afterThreadName = Thread.currentThread().getName();
+                                afterThreadId = Thread.currentThread().getId();
                                 exchange.getOut().setBody("Bye Camel");
                             }
                         })

Modified: camel/trunk/camel-core/src/test/java/org/apache/camel/processor/async/AsyncEndpointUoWTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/async/AsyncEndpointUoWTest.java?rev=1151762&r1=1151761&r2=1151762&view=diff
==============================================================================
--- camel/trunk/camel-core/src/test/java/org/apache/camel/processor/async/AsyncEndpointUoWTest.java (original)
+++ camel/trunk/camel-core/src/test/java/org/apache/camel/processor/async/AsyncEndpointUoWTest.java Thu Jul 28 08:39:35 2011
@@ -16,7 +16,6 @@
  */
 package org.apache.camel.processor.async;
 
-import java.util.concurrent.atomic.AtomicBoolean;
 import java.util.concurrent.atomic.AtomicInteger;
 
 import org.apache.camel.ContextTestSupport;

Modified: camel/trunk/camel-core/src/test/java/org/apache/camel/processor/async/MyAsyncProducer.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/async/MyAsyncProducer.java?rev=1151762&r1=1151761&r2=1151762&view=diff
==============================================================================
--- camel/trunk/camel-core/src/test/java/org/apache/camel/processor/async/MyAsyncProducer.java (original)
+++ camel/trunk/camel-core/src/test/java/org/apache/camel/processor/async/MyAsyncProducer.java Thu Jul 28 08:39:35 2011
@@ -18,7 +18,6 @@ package org.apache.camel.processor.async
 
 import java.util.concurrent.Callable;
 import java.util.concurrent.ExecutorService;
-import java.util.concurrent.Executors;
 import java.util.concurrent.atomic.AtomicInteger;
 
 import org.apache.camel.AsyncCallback;
@@ -39,7 +38,7 @@ public class MyAsyncProducer extends Def
 
     public MyAsyncProducer(MyAsyncEndpoint endpoint) {
         super(endpoint);
-        this.executor = endpoint.getCamelContext().getExecutorServiceStrategy().newCachedThreadPool(this, "MyProducer");
+        this.executor = endpoint.getCamelContext().getExecutorServiceManager().getDefaultExecutorService("MyProducer", this);
     }
 
     public MyAsyncEndpoint getEndpoint() {

Modified: camel/trunk/camel-core/src/test/java/org/apache/camel/processor/intercept/InterceptFromWhenNoStopTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/intercept/InterceptFromWhenNoStopTest.java?rev=1151762&r1=1151761&r2=1151762&view=diff
==============================================================================
--- camel/trunk/camel-core/src/test/java/org/apache/camel/processor/intercept/InterceptFromWhenNoStopTest.java (original)
+++ camel/trunk/camel-core/src/test/java/org/apache/camel/processor/intercept/InterceptFromWhenNoStopTest.java Thu Jul 28 08:39:35 2011
@@ -19,7 +19,6 @@ package org.apache.camel.processor.inter
 import org.apache.camel.ContextTestSupport;
 import org.apache.camel.builder.RouteBuilder;
 import static org.apache.camel.builder.PredicateBuilder.toPredicate;
-import static org.apache.camel.language.simple.SimpleLanguage.simple;
 
 /**
  * @version 

Modified: camel/trunk/camel-core/src/test/java/org/apache/camel/processor/intercept/InterceptFromWhenTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/intercept/InterceptFromWhenTest.java?rev=1151762&r1=1151761&r2=1151762&view=diff
==============================================================================
--- camel/trunk/camel-core/src/test/java/org/apache/camel/processor/intercept/InterceptFromWhenTest.java (original)
+++ camel/trunk/camel-core/src/test/java/org/apache/camel/processor/intercept/InterceptFromWhenTest.java Thu Jul 28 08:39:35 2011
@@ -19,7 +19,6 @@ package org.apache.camel.processor.inter
 import org.apache.camel.ContextTestSupport;
 import org.apache.camel.builder.RouteBuilder;
 import static org.apache.camel.builder.PredicateBuilder.toPredicate;
-import static org.apache.camel.language.simple.SimpleLanguage.simple;
 
 /**
  * @version 

Modified: camel/trunk/camel-core/src/test/java/org/apache/camel/processor/intercept/InterceptFromWhenWithChoiceTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/intercept/InterceptFromWhenWithChoiceTest.java?rev=1151762&r1=1151761&r2=1151762&view=diff
==============================================================================
--- camel/trunk/camel-core/src/test/java/org/apache/camel/processor/intercept/InterceptFromWhenWithChoiceTest.java (original)
+++ camel/trunk/camel-core/src/test/java/org/apache/camel/processor/intercept/InterceptFromWhenWithChoiceTest.java Thu Jul 28 08:39:35 2011
@@ -19,7 +19,6 @@ package org.apache.camel.processor.inter
 import org.apache.camel.ContextTestSupport;
 import org.apache.camel.builder.RouteBuilder;
 import static org.apache.camel.builder.PredicateBuilder.toPredicate;
-import static org.apache.camel.language.simple.SimpleLanguage.simple;
 
 /**
  * @version 

Modified: camel/trunk/camel-core/src/test/java/org/apache/camel/processor/intercept/InterceptSendToIssue.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/intercept/InterceptSendToIssue.java?rev=1151762&r1=1151761&r2=1151762&view=diff
==============================================================================
--- camel/trunk/camel-core/src/test/java/org/apache/camel/processor/intercept/InterceptSendToIssue.java (original)
+++ camel/trunk/camel-core/src/test/java/org/apache/camel/processor/intercept/InterceptSendToIssue.java Thu Jul 28 08:39:35 2011
@@ -51,6 +51,7 @@ public class InterceptSendToIssue extend
                 from("direct:start")
                     .setHeader(Exchange.FILE_NAME, constant("hello.txt"))
                     .to("direct:foo");
+                from("direct:foo").log("Dummy");
             }
         };
     }

Modified: camel/trunk/camel-core/src/test/java/org/apache/camel/processor/interceptor/TraceInterceptorFactoryCreatesHandlerTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/interceptor/TraceInterceptorFactoryCreatesHandlerTest.java?rev=1151762&r1=1151761&r2=1151762&view=diff
==============================================================================
--- camel/trunk/camel-core/src/test/java/org/apache/camel/processor/interceptor/TraceInterceptorFactoryCreatesHandlerTest.java (original)
+++ camel/trunk/camel-core/src/test/java/org/apache/camel/processor/interceptor/TraceInterceptorFactoryCreatesHandlerTest.java Thu Jul 28 08:39:35 2011
@@ -22,7 +22,6 @@ import java.util.List;
 import org.apache.camel.CamelContext;
 import org.apache.camel.Processor;
 import org.apache.camel.model.ProcessorDefinition;
-import org.apache.camel.processor.DelegateAsyncProcessor;
 import org.apache.camel.processor.DelegateProcessor;
 import org.apache.camel.processor.WrapProcessor;
 

Modified: camel/trunk/camel-core/src/test/java/org/apache/camel/util/DefaultTimeoutMapTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/test/java/org/apache/camel/util/DefaultTimeoutMapTest.java?rev=1151762&r1=1151761&r2=1151762&view=diff
==============================================================================
--- camel/trunk/camel-core/src/test/java/org/apache/camel/util/DefaultTimeoutMapTest.java (original)
+++ camel/trunk/camel-core/src/test/java/org/apache/camel/util/DefaultTimeoutMapTest.java Thu Jul 28 08:39:35 2011
@@ -21,8 +21,12 @@ import java.util.List;
 import java.util.concurrent.ScheduledExecutorService;
 import java.util.concurrent.ScheduledThreadPoolExecutor;
 
+import org.apache.camel.CamelContext;
+import org.apache.camel.builder.ThreadPoolBuilder;
+import org.apache.camel.impl.DefaultCamelContext;
+import org.apache.camel.spi.ThreadPoolProfile;
+
 import junit.framework.TestCase;
-import org.apache.camel.util.concurrent.ExecutorServiceHelper;
 
 /**
  * @version 
@@ -102,7 +106,9 @@ public class DefaultTimeoutMapTest exten
     }
 
     public void testExecutor() throws Exception {
-        ScheduledExecutorService e = ExecutorServiceHelper.newScheduledThreadPool(2, null, "foo", true);
+        CamelContext camelContext = new DefaultCamelContext();
+        ThreadPoolProfile profile = new ThreadPoolBuilder("foo").poolSize(2).daemon().build();
+        ScheduledExecutorService e = camelContext.getExecutorServiceManager().getScheduledExecutorService(profile, this);
 
         DefaultTimeoutMap<String, Integer> map = new DefaultTimeoutMap<String, Integer>(e, 50);
         assertEquals(50, map.getPurgePollTime());

Modified: camel/trunk/camel-core/src/test/java/org/apache/camel/util/jsse/SSLContextParametersTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/test/java/org/apache/camel/util/jsse/SSLContextParametersTest.java?rev=1151762&r1=1151761&r2=1151762&view=diff
==============================================================================
--- camel/trunk/camel-core/src/test/java/org/apache/camel/util/jsse/SSLContextParametersTest.java (original)
+++ camel/trunk/camel-core/src/test/java/org/apache/camel/util/jsse/SSLContextParametersTest.java Thu Jul 28 08:39:35 2011
@@ -16,7 +16,6 @@
  */
 package org.apache.camel.util.jsse;
 
-import java.security.Security;
 import java.util.Arrays;
 import java.util.LinkedList;
 import java.util.List;



Mime
View raw message