You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2020/03/30 19:24:30 UTC

[camel] 01/02: CAMEL-14805: Use doInit for iniitalizing. Fixed supervising route controller. Fixed tests in camel-spring-boot

This is an automated email from the ASF dual-hosted git repository.

davsclaus pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git

commit a1be553016bf8f6906e042266c88f4f76602bf6a
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Mon Mar 30 20:36:59 2020 +0200

    CAMEL-14805: Use doInit for iniitalizing. Fixed supervising route controller. Fixed tests in camel-spring-boot
---
 .../org/apache/camel/impl/engine/SupervisingRouteController.java | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/core/camel-base/src/main/java/org/apache/camel/impl/engine/SupervisingRouteController.java b/core/camel-base/src/main/java/org/apache/camel/impl/engine/SupervisingRouteController.java
index 2f2df57..890960a 100644
--- a/core/camel-base/src/main/java/org/apache/camel/impl/engine/SupervisingRouteController.java
+++ b/core/camel-base/src/main/java/org/apache/camel/impl/engine/SupervisingRouteController.java
@@ -194,14 +194,17 @@ public class SupervisingRouteController extends DefaultRouteController {
     // *********************************
 
     @Override
-    protected void doStart() throws Exception {
-        final CamelContext context = getCamelContext();
-
+    protected void doInit() throws Exception {
+        CamelContext context = getCamelContext();
         context.setAutoStartup(false);
         context.addRoutePolicyFactory(new ManagedRoutePolicyFactory());
         context.addStartupListener(this.listener);
         context.getManagementStrategy().addEventNotifier(this.listener);
+    }
 
+    @Override
+    protected void doStart() throws Exception {
+        CamelContext context = getCamelContext();
         executorService = context.getExecutorServiceManager().newSingleThreadScheduledExecutor(this, "SupervisingRouteController");
         timer = new BackOffTimer(executorService);
     }