camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gno...@apache.org
Subject [camel] 02/02: Move initialization of PlatformHttpComponent to the init phase
Date Fri, 27 Mar 2020 17:31:52 GMT
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 <gnodet@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


Mime
View raw message