Author: davsclaus
Date: Mon Aug  9 13:19:50 2010
New Revision: 983633

URL: http://svn.apache.org/viewvc?rev=983633&view=rev
Log:
CAMEL-3034: OSGi CamelContext name strategy is only using bundle id and returns 
a JMX friendly name.

Modified:
    
camel/trunk/components/camel-core-osgi/src/main/java/org/apache/camel/core/osgi/OsgiCamelContextNameStrategy.java

Modified: 
camel/trunk/components/camel-core-osgi/src/main/java/org/apache/camel/core/osgi/OsgiCamelContextNameStrategy.java
URL: 
http://svn.apache.org/viewvc/camel/trunk/components/camel-core-osgi/src/main/java/org/apache/camel/core/osgi/OsgiCamelContextNameStrategy.java?rev=983633&r1=983632&r2=983633&view=diff
==============================================================================
--- 
camel/trunk/components/camel-core-osgi/src/main/java/org/apache/camel/core/osgi/OsgiCamelContextNameStrategy.java
 (original)
+++ 
camel/trunk/components/camel-core-osgi/src/main/java/org/apache/camel/core/osgi/OsgiCamelContextNameStrategy.java
 Mon Aug  9 13:19:50 2010
@@ -14,16 +14,20 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-
 package org.apache.camel.core.osgi;
 
-import org.apache.camel.impl.DefaultCamelContextNameStrategy;
+import org.apache.camel.spi.CamelContextNameStrategy;
 import org.osgi.framework.BundleContext;
 
-public class OsgiCamelContextNameStrategy extends 
DefaultCamelContextNameStrategy {
+public class OsgiCamelContextNameStrategy implements CamelContextNameStrategy {
+
+    private final String name;
     
     public OsgiCamelContextNameStrategy(BundleContext context) {
-        name = "Bundle:" + context.getBundle().getBundleId() + ":" + 
getNextName();
+        name = "camel-" + context.getBundle().getBundleId();
     }
 
+    public String getName() {
+        return name;
+    }
 }


Reply via email to