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

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


The following commit(s) were added to refs/heads/main by this push:
     new 3e95c2a9d Use bundle synbolic name as camel context name by default 
(#678)
3e95c2a9d is described below

commit 3e95c2a9d11d3a6de5e8e42c92e4206bdef57fae
Author: JB Onofré <[email protected]>
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();
     }
 

Reply via email to