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/26 15:03:04 UTC
[camel-karaf] branch master updated: [CAMEL-14712] Fix lifecycle
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-karaf.git
The following commit(s) were added to refs/heads/master by this push:
new bb1f504 [CAMEL-14712] Fix lifecycle
bb1f504 is described below
commit bb1f5042042fbb3e122cb533eddbc3207c3d8efe
Author: Guillaume Nodet <gn...@gmail.com>
AuthorDate: Thu Mar 26 16:02:33 2020 +0100
[CAMEL-14712] Fix lifecycle
---
.../java/org/apache/camel/blueprint/BlueprintCamelContext.java | 8 ++++----
.../org/apache/camel/blueprint/handler/CamelNamespaceHandler.java | 2 +-
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/components/camel-blueprint/src/main/java/org/apache/camel/blueprint/BlueprintCamelContext.java b/components/camel-blueprint/src/main/java/org/apache/camel/blueprint/BlueprintCamelContext.java
index e9fcf46..3778f1e 100644
--- a/components/camel-blueprint/src/main/java/org/apache/camel/blueprint/BlueprintCamelContext.java
+++ b/components/camel-blueprint/src/main/java/org/apache/camel/blueprint/BlueprintCamelContext.java
@@ -76,7 +76,7 @@ public class BlueprintCamelContext extends DefaultCamelContext implements Servic
setLanguageResolver(new BlueprintLanguageResolver(bundleContext));
setDataFormatResolver(new BlueprintDataFormatResolver(bundleContext));
setApplicationContextClassLoader(new BundleDelegatingClassLoader(bundleContext.getBundle()));
- init();
+ build();
}
@Override
@@ -110,8 +110,8 @@ public class BlueprintCamelContext extends DefaultCamelContext implements Servic
}
@Override
- public void doInit() throws Exception {
- LOG.trace("init {}", this);
+ public void doBuild() throws Exception {
+ LOG.trace("build {}", this);
// add service listener so we can be notified when blueprint container is done
// and we would be ready to start CamelContext
bundleContext.addServiceListener(this);
@@ -119,7 +119,7 @@ public class BlueprintCamelContext extends DefaultCamelContext implements Servic
// to support change events when it changes states
registration = bundleContext.registerService(BlueprintListener.class, this, null);
// call super
- super.doInit();
+ super.doBuild();
}
public void destroy() throws Exception {
diff --git a/components/camel-blueprint/src/main/java/org/apache/camel/blueprint/handler/CamelNamespaceHandler.java b/components/camel-blueprint/src/main/java/org/apache/camel/blueprint/handler/CamelNamespaceHandler.java
index f4c8173..3d71208 100644
--- a/components/camel-blueprint/src/main/java/org/apache/camel/blueprint/handler/CamelNamespaceHandler.java
+++ b/components/camel-blueprint/src/main/java/org/apache/camel/blueprint/handler/CamelNamespaceHandler.java
@@ -283,7 +283,7 @@ public class CamelNamespaceHandler implements NamespaceHandler {
ctx.setFactoryComponent(factory2);
ctx.setFactoryMethod("getContext");
ctx.addProperty("bundleStateService", createRef(context, ".camelBlueprint.bundleStateService"));
- ctx.setInitMethod("init");
+ ctx.setInitMethod("build");
ctx.setDestroyMethod("destroy");
// Register factory beans