Repository: camel
Updated Branches:
  refs/heads/master 2d12e18b3 -> a36c0a8f1


Add some comments around the CAMEL-10279 fix


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

Branch: refs/heads/master
Commit: a36c0a8f19b0cab26fa5b2cca3a0851335128a7e
Parents: 2d12e18
Author: Hiram Chirino <hi...@hiramchirino.com>
Authored: Thu Sep 1 13:04:39 2016 -0400
Committer: Hiram Chirino <hi...@hiramchirino.com>
Committed: Thu Sep 1 13:05:29 2016 -0400

----------------------------------------------------------------------
 .../org/apache/camel/spring/boot/CamelAutoConfiguration.java     | 4 ++++
 1 file changed, 4 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/a36c0a8f/components/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/CamelAutoConfiguration.java
----------------------------------------------------------------------
diff --git 
a/components/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/CamelAutoConfiguration.java
 
b/components/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/CamelAutoConfiguration.java
index 4ae9308..d4335a4 100644
--- 
a/components/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/CamelAutoConfiguration.java
+++ 
b/components/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/CamelAutoConfiguration.java
@@ -185,6 +185,10 @@ public class CamelAutoConfiguration {
 
     @Bean
     CamelSpringBootApplicationController 
applicationController(ApplicationContext applicationContext, CamelContext 
camelContext) {
+        // CAMEL-10279: We have to call setNoStart(true) here so that if a 
<camelContext> is imported via
+        // @ImportResource then it does not get started before the 
RoutesCollector gets a chance to add any
+        // routes found in RouteBuilders.  Even if no RouteBuilders are found, 
the RoutesCollector will handle
+        // starting the the Camel Context.
         SpringCamelContext.setNoStart(true);
         return new CamelSpringBootApplicationController(applicationContext, 
camelContext);
     }

Reply via email to