You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by gn...@apache.org on 2020/03/27 17:31:52 UTC

[camel] 02/02: Move initialization of PlatformHttpComponent to the init phase

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

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

commit a86324fda09a67aa0ce98bf8c48b0294787d1244
Author: Guillaume Nodet <gn...@gmail.com>
AuthorDate: Fri Mar 27 18:31:21 2020 +0100

    Move initialization of PlatformHttpComponent to the init phase
---
 .../camel/component/platform/http/PlatformHttpComponent.java   | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/components/camel-platform-http/src/main/java/org/apache/camel/component/platform/http/PlatformHttpComponent.java b/components/camel-platform-http/src/main/java/org/apache/camel/component/platform/http/PlatformHttpComponent.java
index f324188..f2d389d 100644
--- a/components/camel-platform-http/src/main/java/org/apache/camel/component/platform/http/PlatformHttpComponent.java
+++ b/components/camel-platform-http/src/main/java/org/apache/camel/component/platform/http/PlatformHttpComponent.java
@@ -83,7 +83,7 @@ public class PlatformHttpComponent extends DefaultComponent implements RestConsu
     }
 
     @Override
-    protected void doStart() throws Exception {
+    protected void doInit() throws Exception {
         if (engine == null) {
             LOGGER.debug("Lookup platform http engine from registry");
 
@@ -106,9 +106,15 @@ public class PlatformHttpComponent extends DefaultComponent implements RestConsu
         }
 
         CamelContextAware.trySetCamelContext(engine, getCamelContext());
-        ServiceHelper.startService(engine);
+        ServiceHelper.initService(engine);
+
+        super.doInit();
+    }
 
+    @Override
+    protected void doStart() throws Exception {
         super.doStart();
+        ServiceHelper.startService(engine);
     }
 
     @Override