You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by jb...@apache.org on 2026/02/16 05:12:07 UTC

(camel-karaf) branch camel-karaf-4.8.x updated: Use bundle synbolic name as camel context name by default (#678)

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

jbonofre pushed a commit to branch camel-karaf-4.8.x
in repository https://gitbox.apache.org/repos/asf/camel-karaf.git


The following commit(s) were added to refs/heads/camel-karaf-4.8.x by this push:
     new fa5599ffa Use bundle synbolic name as camel context name by default (#678)
fa5599ffa is described below

commit fa5599ffaa06317cef2aa25bbe16959ef640534a
Author: JB Onofré <jb...@apache.org>
AuthorDate: Mon Feb 16 06:10:32 2026 +0100

    Use bundle synbolic name as camel context name by default (#678)
---
 .../java/org/apache/camel/karaf/core/OsgiDefaultCamelContext.java    | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/core/camel-core-osgi/src/main/java/org/apache/camel/karaf/core/OsgiDefaultCamelContext.java b/core/camel-core-osgi/src/main/java/org/apache/camel/karaf/core/OsgiDefaultCamelContext.java
index af217958d..91dbad3fa 100644
--- a/core/camel-core-osgi/src/main/java/org/apache/camel/karaf/core/OsgiDefaultCamelContext.java
+++ b/core/camel-core-osgi/src/main/java/org/apache/camel/karaf/core/OsgiDefaultCamelContext.java
@@ -19,7 +19,6 @@ package org.apache.camel.karaf.core;
 import org.apache.camel.TypeConverter;
 import org.apache.camel.karaf.core.utils.BundleContextUtils;
 import org.apache.camel.karaf.core.utils.BundleDelegatingClassLoader;
-import org.apache.camel.impl.DefaultCamelContext;
 import org.apache.camel.support.DefaultRegistry;
 import org.osgi.framework.BundleContext;
 
@@ -42,6 +41,10 @@ public class OsgiDefaultCamelContext extends AbstractOsgiDefaultCamelContext {
         // setup the application context classloader with the bundle classloader
         setApplicationContextClassLoader(new BundleDelegatingClassLoader(bundleContext.getBundle()));
 
+        if (getCamelContextExtension().getName() == null) {
+            getCamelContextExtension().setName(bundleContext.getBundle().getSymbolicName());
+        }
+
         init();
     }