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 2019/12/06 08:35:27 UTC

[camel] branch master updated: CAMEL-14265: camel-cdi - Standalone CDI with Camel Main discovers routes twice

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


The following commit(s) were added to refs/heads/master by this push:
     new b0e9543  CAMEL-14265: camel-cdi - Standalone CDI with Camel Main discovers routes twice
b0e9543 is described below

commit b0e95435be210a02cb8f46af2a4ab95ce9c36d4e
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Fri Dec 6 09:34:31 2019 +0100

    CAMEL-14265: camel-cdi - Standalone CDI with Camel Main discovers routes twice
---
 components/camel-cdi/src/main/java/org/apache/camel/cdi/Main.java | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/components/camel-cdi/src/main/java/org/apache/camel/cdi/Main.java b/components/camel-cdi/src/main/java/org/apache/camel/cdi/Main.java
index 25ed9e7..20210e9 100644
--- a/components/camel-cdi/src/main/java/org/apache/camel/cdi/Main.java
+++ b/components/camel-cdi/src/main/java/org/apache/camel/cdi/Main.java
@@ -104,6 +104,11 @@ public class Main extends MainCommandLineSupport {
         warnIfNoCamelFound();
     }
 
+    @Override
+    protected void initCamelContext() throws Exception {
+        // camel-cdi has already initialized and start CamelContext so we should not do this again
+    }
+
     private void warnIfNoCamelFound() {
         BeanManager manager = cdiContainer.getBeanManager();
         Set<Bean<?>> contexts = manager.getBeans(CamelContext.class, ANY);