Repository: camel
Updated Branches:
  refs/heads/master 0282a13b8 -> 366ad8d0b


http://git-wip-us.apache.org/repos/asf/camel/blob/366ad8d0/components/camel-test-spring41/src/test/java/org/apache/camel/test/spring/CamelSpringJUnit4ClassRunnerUseAdviceWithTest.java
----------------------------------------------------------------------
diff --git 
a/components/camel-test-spring41/src/test/java/org/apache/camel/test/spring/CamelSpringJUnit4ClassRunnerUseAdviceWithTest.java
 
b/components/camel-test-spring41/src/test/java/org/apache/camel/test/spring/CamelSpringJUnit4ClassRunnerUseAdviceWithTest.java
new file mode 100644
index 0000000..7cf5e06
--- /dev/null
+++ 
b/components/camel-test-spring41/src/test/java/org/apache/camel/test/spring/CamelSpringJUnit4ClassRunnerUseAdviceWithTest.java
@@ -0,0 +1,52 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.test.spring;
+
+import org.apache.camel.ServiceStatus;
+import org.apache.camel.util.StopWatch;
+import org.junit.Before;
+import org.junit.Test;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+
+@UseAdviceWith
+public class CamelSpringJUnit4ClassRunnerUseAdviceWithTest extends 
CamelSpringJUnit4ClassRunnerPlainTest {
+    
+    @Before
+    public void testContextStarted() throws Exception {
+        
+        assertEquals(ServiceStatus.Stopped, camelContext.getStatus());
+        assertEquals(ServiceStatus.Stopped, camelContext2.getStatus());
+        camelContext.start();
+        camelContext2.start();
+
+        // just sleep a little to simulate testing take a bit time
+        Thread.sleep(1000);
+    }
+    
+    @Test
+    public void testStopwatch() {
+        StopWatch stopWatch = StopWatchTestExecutionListener.getStopWatch();
+        
+        assertNotNull(stopWatch);
+        long taken = stopWatch.taken();
+        assertTrue(taken + " > 0, but was: " + taken, taken > 0);
+        assertTrue(taken + " < 3000, but was: " + taken, taken < 3000);
+    }
+}

http://git-wip-us.apache.org/repos/asf/camel/blob/366ad8d0/components/camel-test-spring41/src/test/java/org/apache/camel/test/spring/CamelSpringTestSupportActiveProfileTest.java
----------------------------------------------------------------------
diff --git 
a/components/camel-test-spring41/src/test/java/org/apache/camel/test/spring/CamelSpringTestSupportActiveProfileTest.java
 
b/components/camel-test-spring41/src/test/java/org/apache/camel/test/spring/CamelSpringTestSupportActiveProfileTest.java
new file mode 100644
index 0000000..7e7445c
--- /dev/null
+++ 
b/components/camel-test-spring41/src/test/java/org/apache/camel/test/spring/CamelSpringTestSupportActiveProfileTest.java
@@ -0,0 +1,51 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.test.spring;
+
+import org.junit.Test;
+import org.springframework.context.support.AbstractApplicationContext;
+import org.springframework.context.support.ClassPathXmlApplicationContext;
+
+// START SNIPPET: e1
+
+/**
+ * Just extend the CamelSpringTestSupport and use Camel test kit for easy 
Camel based unit testing.
+ */
+public class CamelSpringTestSupportActiveProfileTest extends 
CamelSpringTestSupport {
+
+    @Override
+    protected AbstractApplicationContext createApplicationContext() {
+        // must not refresh when using active profiles
+        // lets reuse the xml file from the other test
+        return new ClassPathXmlApplicationContext(new 
String[]{"org/apache/camel/test/spring/CamelSpringActiveProfileTest-context.xml"},
 false);
+    }
+
+    @Override
+    protected String[] activeProfiles() {
+        // return the active profiles to be used
+        return new String[]{"test"};
+    }
+
+    @Test
+    public void testLoadActiveProfile() throws InterruptedException {
+        getMockEndpoint("mock:test").expectedBodiesReceived("Hello World");
+        template.sendBody("direct:start", "World");
+        assertMockEndpointsSatisfied();
+    }
+
+}
+// END SNIPPET: e1

http://git-wip-us.apache.org/repos/asf/camel/blob/366ad8d0/components/camel-test-spring41/src/test/java/org/apache/camel/test/spring/TestRouteBuilder.java
----------------------------------------------------------------------
diff --git 
a/components/camel-test-spring41/src/test/java/org/apache/camel/test/spring/TestRouteBuilder.java
 
b/components/camel-test-spring41/src/test/java/org/apache/camel/test/spring/TestRouteBuilder.java
new file mode 100644
index 0000000..52059c4
--- /dev/null
+++ 
b/components/camel-test-spring41/src/test/java/org/apache/camel/test/spring/TestRouteBuilder.java
@@ -0,0 +1,30 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.test.spring;
+
+import org.apache.camel.builder.RouteBuilder;
+
+public class TestRouteBuilder extends RouteBuilder {
+
+    @Override
+    public void configure() throws Exception {
+        
+        from("direct:z")
+            .routeId("excludedRoute")
+            .to("log:org.apache.camel.test.junit4.spring");
+    }
+}

http://git-wip-us.apache.org/repos/asf/camel/blob/366ad8d0/components/camel-test-spring41/src/test/resources/jndi.properties
----------------------------------------------------------------------
diff --git a/components/camel-test-spring41/src/test/resources/jndi.properties 
b/components/camel-test-spring41/src/test/resources/jndi.properties
new file mode 100644
index 0000000..5961589
--- /dev/null
+++ b/components/camel-test-spring41/src/test/resources/jndi.properties
@@ -0,0 +1,22 @@
+## ---------------------------------------------------------------------------
+## Licensed to the Apache Software Foundation (ASF) under one or more
+## contributor license agreements.  See the NOTICE file distributed with
+## this work for additional information regarding copyright ownership.
+## The ASF licenses this file to You under the Apache License, Version 2.0
+## (the "License"); you may not use this file except in compliance with
+## the License.  You may obtain a copy of the License at
+##
+## http://www.apache.org/licenses/LICENSE-2.0
+##
+## Unless required by applicable law or agreed to in writing, software
+## distributed under the License is distributed on an "AS IS" BASIS,
+## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+## See the License for the specific language governing permissions and
+## limitations under the License.
+## ---------------------------------------------------------------------------
+
+# START SNIPPET: jndi
+
+java.naming.factory.initial = 
org.apache.camel.util.jndi.CamelInitialContextFactory
+
+# END SNIPPET: jndi

http://git-wip-us.apache.org/repos/asf/camel/blob/366ad8d0/components/camel-test-spring41/src/test/resources/log4j.properties
----------------------------------------------------------------------
diff --git a/components/camel-test-spring41/src/test/resources/log4j.properties 
b/components/camel-test-spring41/src/test/resources/log4j.properties
new file mode 100644
index 0000000..1eb13a5
--- /dev/null
+++ b/components/camel-test-spring41/src/test/resources/log4j.properties
@@ -0,0 +1,37 @@
+## ------------------------------------------------------------------------
+## Licensed to the Apache Software Foundation (ASF) under one or more
+## contributor license agreements.  See the NOTICE file distributed with
+## this work for additional information regarding copyright ownership.
+## The ASF licenses this file to You under the Apache License, Version 2.0
+## (the "License"); you may not use this file except in compliance with
+## the License.  You may obtain a copy of the License at
+##
+## http://www.apache.org/licenses/LICENSE-2.0
+##
+## Unless required by applicable law or agreed to in writing, software
+## distributed under the License is distributed on an "AS IS" BASIS,
+## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+## See the License for the specific language governing permissions and
+## limitations under the License.
+## ------------------------------------------------------------------------
+
+#
+# The logging properties used for testing
+#
+log4j.rootLogger=INFO, file
+
+log4j.logger.org.springframework=WARN
+#log4j.logger.org.apache.camel=DEBUG
+#log4j.logger.org.apache.camel.test.junit4=DEBUG
+
+# CONSOLE appender not used by default
+log4j.appender.out=org.apache.log4j.ConsoleAppender
+log4j.appender.out.layout=org.apache.log4j.PatternLayout
+log4j.appender.out.layout.ConversionPattern=[%30.30t] %-30.30c{1} %-5p %m%n
+#log4j.appender.out.layout.ConversionPattern=%d [%-15.15t] %-5p %-30.30c{1} - 
%m%n
+
+# File appender
+log4j.appender.file=org.apache.log4j.FileAppender
+log4j.appender.file.layout=org.apache.log4j.PatternLayout
+log4j.appender.file.layout.ConversionPattern=%d %-5p %c{1} - %m %n
+log4j.appender.file.file=target/camel-spring-test.log

http://git-wip-us.apache.org/repos/asf/camel/blob/366ad8d0/components/camel-test-spring41/src/test/resources/org/apache/camel/test/issues/AdviceWithOnExceptionMultipleIssueTest.xml
----------------------------------------------------------------------
diff --git 
a/components/camel-test-spring41/src/test/resources/org/apache/camel/test/issues/AdviceWithOnExceptionMultipleIssueTest.xml
 
b/components/camel-test-spring41/src/test/resources/org/apache/camel/test/issues/AdviceWithOnExceptionMultipleIssueTest.xml
new file mode 100644
index 0000000..76b18ed
--- /dev/null
+++ 
b/components/camel-test-spring41/src/test/resources/org/apache/camel/test/issues/AdviceWithOnExceptionMultipleIssueTest.xml
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+    Licensed to the Apache Software Foundation (ASF) under one or more
+    contributor license agreements.  See the NOTICE file distributed with
+    this work for additional information regarding copyright ownership.
+    The ASF licenses this file to You under the Apache License, Version 2.0
+    (the "License"); you may not use this file except in compliance with
+    the License.  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+-->
+<beans xmlns="http://www.springframework.org/schema/beans";
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
+       xmlns:camel="http://camel.apache.org/schema/spring";
+       xsi:schemaLocation="
+               http://camel.apache.org/schema/spring 
http://camel.apache.org/schema/spring/camel-spring.xsd
+               http://www.springframework.org/schema/beans 
http://www.springframework.org/schema/beans/spring-beans.xsd ">
+
+  <camelContext xmlns="http://camel.apache.org/schema/spring";>
+
+    <onException>
+      <exception>java.lang.Exception</exception>
+      <handled>
+        <constant>true</constant>
+      </handled>
+      <to uri="mock:error"/>
+    </onException>
+
+    <route id="RouteA">
+      <from uri="direct:startA"/>
+      <to uri="mock:resultA"/>
+    </route>
+
+    <route id="RouteB">
+      <from uri="direct:startB"/>
+      <to uri="mock:resultB"/>
+    </route>
+
+  </camelContext>
+
+</beans>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/camel/blob/366ad8d0/components/camel-test-spring41/src/test/resources/org/apache/camel/test/issues/MockEndpointsAndSkipTest.xml
----------------------------------------------------------------------
diff --git 
a/components/camel-test-spring41/src/test/resources/org/apache/camel/test/issues/MockEndpointsAndSkipTest.xml
 
b/components/camel-test-spring41/src/test/resources/org/apache/camel/test/issues/MockEndpointsAndSkipTest.xml
new file mode 100644
index 0000000..81b9093
--- /dev/null
+++ 
b/components/camel-test-spring41/src/test/resources/org/apache/camel/test/issues/MockEndpointsAndSkipTest.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+    Licensed to the Apache Software Foundation (ASF) under one or more
+    contributor license agreements.  See the NOTICE file distributed with
+    this work for additional information regarding copyright ownership.
+    The ASF licenses this file to You under the Apache License, Version 2.0
+    (the "License"); you may not use this file except in compliance with
+    the License.  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+-->
+<beans xmlns="http://www.springframework.org/schema/beans";
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
+       xmlns:camel="http://camel.apache.org/schema/spring";
+       xsi:schemaLocation="
+               http://camel.apache.org/schema/spring 
http://camel.apache.org/schema/spring/camel-spring.xsd
+               http://www.springframework.org/schema/beans 
http://www.springframework.org/schema/beans/spring-beans.xsd ">
+
+  <camelContext xmlns="http://camel.apache.org/schema/spring";>
+
+    <route>
+      <from uri="direct:start"/>
+      <to uri="log:foo"/>
+      <to uri="seda:foo"/>
+    </route>
+
+  </camelContext>
+
+</beans>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/camel/blob/366ad8d0/components/camel-test-spring41/src/test/resources/org/apache/camel/test/patterns/ProduceBeanInjectTest.xml
----------------------------------------------------------------------
diff --git 
a/components/camel-test-spring41/src/test/resources/org/apache/camel/test/patterns/ProduceBeanInjectTest.xml
 
b/components/camel-test-spring41/src/test/resources/org/apache/camel/test/patterns/ProduceBeanInjectTest.xml
new file mode 100644
index 0000000..a697e1d
--- /dev/null
+++ 
b/components/camel-test-spring41/src/test/resources/org/apache/camel/test/patterns/ProduceBeanInjectTest.xml
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+    Licensed to the Apache Software Foundation (ASF) under one or more
+    contributor license agreements.  See the NOTICE file distributed with
+    this work for additional information regarding copyright ownership.
+    The ASF licenses this file to You under the Apache License, Version 2.0
+    (the "License"); you may not use this file except in compliance with
+    the License.  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+-->
+<beans xmlns="http://www.springframework.org/schema/beans";
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
+       xmlns:camel="http://camel.apache.org/schema/spring";
+       xsi:schemaLocation="
+               http://camel.apache.org/schema/spring 
http://camel.apache.org/schema/spring/camel-spring.xsd
+               http://www.springframework.org/schema/beans 
http://www.springframework.org/schema/beans/spring-beans.xsd ">
+
+   
+    <camelContext id="camelContext" 
xmlns="http://camel.apache.org/schema/spring";>
+               <route>
+                       <from uri="direct:start"/>
+            <transform>
+               <simple>${in.body} rocks!</simple>
+             </transform>
+               </route>
+    </camelContext>
+    
+    <!--bean id="camelPostProcessBean" 
class="org.apache.camel.spring.CamelBeanPostProcessor" /-->
+
+    <bean id="myProduceBean" 
class="org.apache.camel.test.patterns.MyProduceBean"/>
+    
+</beans>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/camel/blob/366ad8d0/components/camel-test-spring41/src/test/resources/org/apache/camel/test/patterns/ProduceBeanTest.xml
----------------------------------------------------------------------
diff --git 
a/components/camel-test-spring41/src/test/resources/org/apache/camel/test/patterns/ProduceBeanTest.xml
 
b/components/camel-test-spring41/src/test/resources/org/apache/camel/test/patterns/ProduceBeanTest.xml
new file mode 100644
index 0000000..525ed01
--- /dev/null
+++ 
b/components/camel-test-spring41/src/test/resources/org/apache/camel/test/patterns/ProduceBeanTest.xml
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+    Licensed to the Apache Software Foundation (ASF) under one or more
+    contributor license agreements.  See the NOTICE file distributed with
+    this work for additional information regarding copyright ownership.
+    The ASF licenses this file to You under the Apache License, Version 2.0
+    (the "License"); you may not use this file except in compliance with
+    the License.  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+-->
+<beans xmlns="http://www.springframework.org/schema/beans";
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
+       xmlns:camel="http://camel.apache.org/schema/spring";
+       xsi:schemaLocation="
+               http://camel.apache.org/schema/spring 
http://camel.apache.org/schema/spring/camel-spring.xsd
+               http://www.springframework.org/schema/beans 
http://www.springframework.org/schema/beans/spring-beans.xsd ">
+
+<camelContext id="camelContext" xmlns="http://camel.apache.org/schema/spring";>
+
+               <route>
+                       <from uri="direct:start"/>
+      <bean beanType="org.apache.camel.test.patterns.MyProduceBean"/>
+               </route>
+       </camelContext>
+
+</beans>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/camel/blob/366ad8d0/components/camel-test-spring41/src/test/resources/org/apache/camel/test/patterns/applicationContext.xml
----------------------------------------------------------------------
diff --git 
a/components/camel-test-spring41/src/test/resources/org/apache/camel/test/patterns/applicationContext.xml
 
b/components/camel-test-spring41/src/test/resources/org/apache/camel/test/patterns/applicationContext.xml
new file mode 100644
index 0000000..081ae23
--- /dev/null
+++ 
b/components/camel-test-spring41/src/test/resources/org/apache/camel/test/patterns/applicationContext.xml
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+    Licensed to the Apache Software Foundation (ASF) under one or more
+    contributor license agreements.  See the NOTICE file distributed with
+    this work for additional information regarding copyright ownership.
+    The ASF licenses this file to You under the Apache License, Version 2.0
+    (the "License"); you may not use this file except in compliance with
+    the License.  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+-->
+<beans xmlns="http://www.springframework.org/schema/beans";
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
+    xmlns:camel="http://camel.apache.org/schema/spring";
+       xsi:schemaLocation="
+               http://camel.apache.org/schema/spring 
http://camel.apache.org/schema/spring/camel-spring.xsd
+               http://www.springframework.org/schema/beans 
http://www.springframework.org/schema/beans/spring-beans.xsd ">
+
+
+       <camelContext id="camelContext" 
xmlns="http://camel.apache.org/schema/spring"; trace="true" autoStartup="true" >
+
+               <route>
+                       <from uri="direct:start" />
+                       <to uri="mock:a" />
+                       <transform>
+                               <simple>Hello ${body}</simple>
+                       </transform>
+                       <to uri="mock:b" />
+               </route>
+       </camelContext>
+
+</beans>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/camel/blob/366ad8d0/components/camel-test-spring41/src/test/resources/org/apache/camel/test/spring/CamelSpringActiveProfileTest-context.xml
----------------------------------------------------------------------
diff --git 
a/components/camel-test-spring41/src/test/resources/org/apache/camel/test/spring/CamelSpringActiveProfileTest-context.xml
 
b/components/camel-test-spring41/src/test/resources/org/apache/camel/test/spring/CamelSpringActiveProfileTest-context.xml
new file mode 100644
index 0000000..ceacb2d
--- /dev/null
+++ 
b/components/camel-test-spring41/src/test/resources/org/apache/camel/test/spring/CamelSpringActiveProfileTest-context.xml
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+    Licensed to the Apache Software Foundation (ASF) under one or more
+    contributor license agreements.  See the NOTICE file distributed with
+    this work for additional information regarding copyright ownership.
+    The ASF licenses this file to You under the Apache License, Version 2.0
+    (the "License"); you may not use this file except in compliance with
+    the License.  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+-->
+<beans xmlns="http://www.springframework.org/schema/beans";
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
+    xmlns:camel="http://camel.apache.org/schema/spring";
+       xsi:schemaLocation="
+               http://camel.apache.org/schema/spring 
http://camel.apache.org/schema/spring/camel-spring.xsd
+               http://www.springframework.org/schema/beans 
http://www.springframework.org/schema/beans/spring-beans.xsd ">
+
+  <camelContext id="camelContext" 
xmlns="http://camel.apache.org/schema/spring";>
+    <route>
+      <from uri="direct:start" />
+      <transform>
+        <simple>Hello ${body}</simple>
+      </transform>
+      <to uri="properties:{{cool.end}}" />
+    </route>
+  </camelContext>
+  
+  <!-- setup the profile for testing -->
+  <beans profile="test">
+     <bean id="bridgePropertyPlaceholder" 
class="org.apache.camel.spring.spi.BridgePropertyPlaceholderConfigurer">
+         <property name="location" 
value="classpath:org/apache/camel/test/spring/test.properties"/>
+     </bean>
+  </beans>
+</beans>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/camel/blob/366ad8d0/components/camel-test-spring41/src/test/resources/org/apache/camel/test/spring/CamelSpringJUnit4ClassRunnerPlainTest-context.xml
----------------------------------------------------------------------
diff --git 
a/components/camel-test-spring41/src/test/resources/org/apache/camel/test/spring/CamelSpringJUnit4ClassRunnerPlainTest-context.xml
 
b/components/camel-test-spring41/src/test/resources/org/apache/camel/test/spring/CamelSpringJUnit4ClassRunnerPlainTest-context.xml
new file mode 100644
index 0000000..ee2e7ce
--- /dev/null
+++ 
b/components/camel-test-spring41/src/test/resources/org/apache/camel/test/spring/CamelSpringJUnit4ClassRunnerPlainTest-context.xml
@@ -0,0 +1,50 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+    Licensed to the Apache Software Foundation (ASF) under one or more
+    contributor license agreements.  See the NOTICE file distributed with
+    this work for additional information regarding copyright ownership.
+    The ASF licenses this file to You under the Apache License, Version 2.0
+    (the "License"); you may not use this file except in compliance with
+    the License.  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+-->
+<beans xmlns="http://www.springframework.org/schema/beans";
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
+       xsi:schemaLocation="
+               http://camel.apache.org/schema/spring 
http://camel.apache.org/schema/spring/camel-spring.xsd
+               http://www.springframework.org/schema/beans 
http://www.springframework.org/schema/beans/spring-beans.xsd ">
+
+  <camelContext id="camelContext" 
xmlns="http://camel.apache.org/schema/spring"; trace="true" autoStartup="true">
+    <packageScan>
+      <package>org.apache.camel.test.spring</package>
+    </packageScan>
+    <route>
+      <from uri="direct:start"/>
+      <to uri="mock:a"/>
+      <transform>
+        <simple>Hello ${body}</simple>
+      </transform>
+      <to uri="mock:b"/>
+    </route>
+  </camelContext>
+
+  <camelContext id="camelContext2" 
xmlns="http://camel.apache.org/schema/spring"; trace="true" autoStartup="true">
+    <route>
+      <from uri="direct:start2"/>
+      <to uri="mock:c"/>
+      <transform>
+        <simple>Hello ${body}</simple>
+      </transform>
+      <to uri="log:org.apache.camel.test.junit4.spring"/>
+      <to uri="seda:context2.seda"/>
+    </route>
+  </camelContext>
+
+</beans>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/camel/blob/366ad8d0/components/camel-test-spring41/src/test/resources/org/apache/camel/test/spring/test.properties
----------------------------------------------------------------------
diff --git 
a/components/camel-test-spring41/src/test/resources/org/apache/camel/test/spring/test.properties
 
b/components/camel-test-spring41/src/test/resources/org/apache/camel/test/spring/test.properties
new file mode 100644
index 0000000..f891086
--- /dev/null
+++ 
b/components/camel-test-spring41/src/test/resources/org/apache/camel/test/spring/test.properties
@@ -0,0 +1,18 @@
+## ---------------------------------------------------------------------------
+## Licensed to the Apache Software Foundation (ASF) under one or more
+## contributor license agreements.  See the NOTICE file distributed with
+## this work for additional information regarding copyright ownership.
+## The ASF licenses this file to You under the Apache License, Version 2.0
+## (the "License"); you may not use this file except in compliance with
+## the License.  You may obtain a copy of the License at
+##
+## http://www.apache.org/licenses/LICENSE-2.0
+##
+## Unless required by applicable law or agreed to in writing, software
+## distributed under the License is distributed on an "AS IS" BASIS,
+## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+## See the License for the specific language governing permissions and
+## limitations under the License.
+## ---------------------------------------------------------------------------
+
+cool.end=mock:test
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/camel/blob/366ad8d0/components/pom.xml
----------------------------------------------------------------------
diff --git a/components/pom.xml b/components/pom.xml
index 99c82eb..adab222 100644
--- a/components/pom.xml
+++ b/components/pom.xml
@@ -38,6 +38,7 @@
     <module>camel-test-blueprint</module>
     <module>camel-test-spring</module>
     <module>camel-test-spring3</module>
+    <module>camel-test-spring41</module>
     <module>camel-core-osgi</module>
     <module>camel-core-xml</module>
     <module>camel-blueprint</module>

http://git-wip-us.apache.org/repos/asf/camel/blob/366ad8d0/parent/pom.xml
----------------------------------------------------------------------
diff --git a/parent/pom.xml b/parent/pom.xml
index 19eff62..fcda654 100644
--- a/parent/pom.xml
+++ b/parent/pom.xml
@@ -411,6 +411,7 @@
     <spring-version>${spring4-version}</spring-version>
     <spring32-version>3.2.11.RELEASE</spring32-version>
     <spring4-version>4.0.7.RELEASE</spring4-version>
+    <spring41-version>4.1.0.RELEASE</spring41-version>
     <spring-osgi-version>1.2.1</spring-osgi-version>
     <spring-security-version>3.2.5.RELEASE</spring-security-version>
     <spring-ws-version>2.1.4.RELEASE</spring-ws-version>
@@ -1360,6 +1361,11 @@
       </dependency>
       <dependency>
         <groupId>org.apache.camel</groupId>
+        <artifactId>camel-test-spring41</artifactId>
+        <version>${project.version}</version>
+      </dependency>
+      <dependency>
+        <groupId>org.apache.camel</groupId>
         <artifactId>camel-testng</artifactId>
         <version>${project.version}</version>
       </dependency>

Reply via email to