camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject [2/4] CAMEL-6938: Do not include hostname in JMX MBean names by default. Added option to turn it back on in case some people really need the old behavior.
Date Wed, 06 Nov 2013 09:40:27 GMT
http://git-wip-us.apache.org/repos/asf/camel/blob/0e8aa70a/camel-core/src/test/java/org/apache/camel/management/ManagedRedeliverRouteOnlyTest.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/management/ManagedRedeliverRouteOnlyTest.java b/camel-core/src/test/java/org/apache/camel/management/ManagedRedeliverRouteOnlyTest.java
index c293f73..054681a 100644
--- a/camel-core/src/test/java/org/apache/camel/management/ManagedRedeliverRouteOnlyTest.java
+++ b/camel-core/src/test/java/org/apache/camel/management/ManagedRedeliverRouteOnlyTest.java
@@ -44,7 +44,7 @@ public class ManagedRedeliverRouteOnlyTest extends ManagementTestSupport {
 
         assertMockEndpointsSatisfied();
 
-        ObjectName on = ObjectName.getInstance("org.apache.camel:context=localhost/camel-1,type=routes,name=\"route1\"");
+        ObjectName on = ObjectName.getInstance("org.apache.camel:context=camel-1,type=routes,name=\"route1\"");
 
         Long num = (Long) mbeanServer.getAttribute(on, "ExchangesCompleted");
         assertEquals(1, num.longValue());

http://git-wip-us.apache.org/repos/asf/camel/blob/0e8aa70a/camel-core/src/test/java/org/apache/camel/management/ManagedRedeliverTest.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/management/ManagedRedeliverTest.java b/camel-core/src/test/java/org/apache/camel/management/ManagedRedeliverTest.java
index 8af0f52..1bc3ed7 100644
--- a/camel-core/src/test/java/org/apache/camel/management/ManagedRedeliverTest.java
+++ b/camel-core/src/test/java/org/apache/camel/management/ManagedRedeliverTest.java
@@ -45,7 +45,7 @@ public class ManagedRedeliverTest extends ManagementTestSupport {
 
         assertMockEndpointsSatisfied();
 
-        ObjectName on = ObjectName.getInstance("org.apache.camel:context=localhost/camel-1,type=routes,name=\"route1\"");
+        ObjectName on = ObjectName.getInstance("org.apache.camel:context=camel-1,type=routes,name=\"route1\"");
 
         Long num = (Long) mbeanServer.getAttribute(on, "ExchangesCompleted");
         assertEquals(1, num.longValue());
@@ -56,7 +56,7 @@ public class ManagedRedeliverTest extends ManagementTestSupport {
         num = (Long) mbeanServer.getAttribute(on, "FailuresHandled");
         assertEquals(1, num.longValue());
 
-        on = ObjectName.getInstance("org.apache.camel:context=localhost/camel-1,type=processors,name=\"myprocessor\"");
+        on = ObjectName.getInstance("org.apache.camel:context=camel-1,type=processors,name=\"myprocessor\"");
 
         num = (Long) mbeanServer.getAttribute(on, "ExchangesCompleted");
         assertEquals(0, num.longValue());

http://git-wip-us.apache.org/repos/asf/camel/blob/0e8aa70a/camel-core/src/test/java/org/apache/camel/management/ManagedRegisterCamelContextTest.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/management/ManagedRegisterCamelContextTest.java b/camel-core/src/test/java/org/apache/camel/management/ManagedRegisterCamelContextTest.java
index 9104f62..f299b83 100644
--- a/camel-core/src/test/java/org/apache/camel/management/ManagedRegisterCamelContextTest.java
+++ b/camel-core/src/test/java/org/apache/camel/management/ManagedRegisterCamelContextTest.java
@@ -35,7 +35,7 @@ public class ManagedRegisterCamelContextTest extends ManagementTestSupport {
 
         MBeanServer mbeanServer = getMBeanServer();
 
-        ObjectName on = ObjectName.getInstance("org.apache.camel:context=localhost/camel-1,type=context,name=\"camel-1\"");
+        ObjectName on = ObjectName.getInstance("org.apache.camel:context=camel-1,type=context,name=\"camel-1\"");
         String name = (String) mbeanServer.getAttribute(on, "CamelId");
         assertEquals("camel-1", name);
 

http://git-wip-us.apache.org/repos/asf/camel/blob/0e8aa70a/camel-core/src/test/java/org/apache/camel/management/ManagedRegisterEndpointTest.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/management/ManagedRegisterEndpointTest.java b/camel-core/src/test/java/org/apache/camel/management/ManagedRegisterEndpointTest.java
index 4c48690..76bee10 100644
--- a/camel-core/src/test/java/org/apache/camel/management/ManagedRegisterEndpointTest.java
+++ b/camel-core/src/test/java/org/apache/camel/management/ManagedRegisterEndpointTest.java
@@ -34,15 +34,15 @@ public class ManagedRegisterEndpointTest extends ManagementTestSupport {
 
         MBeanServer mbeanServer = getMBeanServer();
 
-        ObjectName name = ObjectName.getInstance("org.apache.camel:context=localhost/camel-1,type=endpoints,name=\"direct://start\"");
+        ObjectName name = ObjectName.getInstance("org.apache.camel:context=camel-1,type=endpoints,name=\"direct://start\"");
         String uri = (String) mbeanServer.getAttribute(name, "EndpointUri");
         assertEquals("direct://start", uri);
 
-        name = ObjectName.getInstance("org.apache.camel:context=localhost/camel-1,type=endpoints,name=\"log://foo\"");
+        name = ObjectName.getInstance("org.apache.camel:context=camel-1,type=endpoints,name=\"log://foo\"");
         uri = (String) mbeanServer.getAttribute(name, "EndpointUri");
         assertEquals("log://foo", uri);
 
-        name = ObjectName.getInstance("org.apache.camel:context=localhost/camel-1,type=endpoints,name=\"mock://result\"");
+        name = ObjectName.getInstance("org.apache.camel:context=camel-1,type=endpoints,name=\"mock://result\"");
         uri = (String) mbeanServer.getAttribute(name, "EndpointUri");
         assertEquals("mock://result", uri);
 

http://git-wip-us.apache.org/repos/asf/camel/blob/0e8aa70a/camel-core/src/test/java/org/apache/camel/management/ManagedRegisterExchangeStatisticsTest.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/management/ManagedRegisterExchangeStatisticsTest.java b/camel-core/src/test/java/org/apache/camel/management/ManagedRegisterExchangeStatisticsTest.java
index d0f7baa..2021d1c 100644
--- a/camel-core/src/test/java/org/apache/camel/management/ManagedRegisterExchangeStatisticsTest.java
+++ b/camel-core/src/test/java/org/apache/camel/management/ManagedRegisterExchangeStatisticsTest.java
@@ -34,7 +34,7 @@ public class ManagedRegisterExchangeStatisticsTest extends ManagementTestSupport
 
         MBeanServer mbeanServer = getMBeanServer();
 
-        ObjectName on = ObjectName.getInstance("org.apache.camel:context=localhost/camel-1,type=routes,name=\"route1\"");
+        ObjectName on = ObjectName.getInstance("org.apache.camel:context=camel-1,type=routes,name=\"route1\"");
         Long completed = (Long) mbeanServer.getAttribute(on, "ExchangesCompleted");
         assertEquals(0, completed.longValue());
 

http://git-wip-us.apache.org/repos/asf/camel/blob/0e8aa70a/camel-core/src/test/java/org/apache/camel/management/ManagedRemoveRouteAggregateThreadPoolTest.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/management/ManagedRemoveRouteAggregateThreadPoolTest.java b/camel-core/src/test/java/org/apache/camel/management/ManagedRemoveRouteAggregateThreadPoolTest.java
index 1842369..6ceedf9 100644
--- a/camel-core/src/test/java/org/apache/camel/management/ManagedRemoveRouteAggregateThreadPoolTest.java
+++ b/camel-core/src/test/java/org/apache/camel/management/ManagedRemoveRouteAggregateThreadPoolTest.java
@@ -35,7 +35,7 @@ public class ManagedRemoveRouteAggregateThreadPoolTest extends ManagementTestSup
         }
 
         MBeanServer mbeanServer = getMBeanServer();
-        ObjectName on = ObjectName.getInstance("org.apache.camel:context=localhost/camel-1,type=routes,name=\"foo\"");
+        ObjectName on = ObjectName.getInstance("org.apache.camel:context=camel-1,type=routes,name=\"foo\"");
 
         getMockEndpoint("mock:result").expectedMessageCount(1);
         template.sendBody("direct:foo", "Hello World");

http://git-wip-us.apache.org/repos/asf/camel/blob/0e8aa70a/camel-core/src/test/java/org/apache/camel/management/ManagedResetIncludeRoutesTest.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/management/ManagedResetIncludeRoutesTest.java b/camel-core/src/test/java/org/apache/camel/management/ManagedResetIncludeRoutesTest.java
index c1c03d5..1e53590 100644
--- a/camel-core/src/test/java/org/apache/camel/management/ManagedResetIncludeRoutesTest.java
+++ b/camel-core/src/test/java/org/apache/camel/management/ManagedResetIncludeRoutesTest.java
@@ -70,7 +70,7 @@ public class ManagedResetIncludeRoutesTest extends ManagementTestSupport {
         }
 
         // reset which should reset all routes also
-        ObjectName ctx = ObjectName.getInstance("org.apache.camel:context=localhost/camel-1,type=context,name=\"camel-1\"");
+        ObjectName ctx = ObjectName.getInstance("org.apache.camel:context=camel-1,type=context,name=\"camel-1\"");
         mbeanServer.invoke(ctx, "reset", new Object[]{true}, new String[]{"boolean"});
 
         // should be 0 on the route

http://git-wip-us.apache.org/repos/asf/camel/blob/0e8aa70a/camel-core/src/test/java/org/apache/camel/management/ManagedResourceTest.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/management/ManagedResourceTest.java b/camel-core/src/test/java/org/apache/camel/management/ManagedResourceTest.java
index 5db2db6..a5caaef 100644
--- a/camel-core/src/test/java/org/apache/camel/management/ManagedResourceTest.java
+++ b/camel-core/src/test/java/org/apache/camel/management/ManagedResourceTest.java
@@ -63,11 +63,11 @@ public class ManagedResourceTest extends ManagementTestSupport {
         LOG.info("managementName = {}", managementName);
 
         // Get the Camel Context MBean
-        ObjectName onContext = ObjectName.getInstance(mBeanServerDefaultDomain + ":context=localhost/" + managementName + ",type=context,name=\"" + context.getName() + "\"");
+        ObjectName onContext = ObjectName.getInstance(mBeanServerDefaultDomain + ":context=" + managementName + ",type=context,name=\"" + context.getName() + "\"");
         TestCase.assertTrue("Should be registered", mBeanServer.isRegistered(onContext));
 
         // Get myManagedBean
-        ObjectName onManagedBean = ObjectName.getInstance(mBeanServerDefaultDomain + ":context=localhost/" + managementName + ",type=processors,name=\"myManagedBean\"");
+        ObjectName onManagedBean = ObjectName.getInstance(mBeanServerDefaultDomain + ":context=" + managementName + ",type=processors,name=\"myManagedBean\"");
         LOG.info("Canonical Name = {}", onManagedBean.getCanonicalName());
         TestCase.assertTrue("Should be registered", mBeanServer.isRegistered(onManagedBean));
 

http://git-wip-us.apache.org/repos/asf/camel/blob/0e8aa70a/camel-core/src/test/java/org/apache/camel/management/ManagedRouteAddFromRouteTest.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/management/ManagedRouteAddFromRouteTest.java b/camel-core/src/test/java/org/apache/camel/management/ManagedRouteAddFromRouteTest.java
index 6d5e594..3de8c18 100644
--- a/camel-core/src/test/java/org/apache/camel/management/ManagedRouteAddFromRouteTest.java
+++ b/camel-core/src/test/java/org/apache/camel/management/ManagedRouteAddFromRouteTest.java
@@ -71,7 +71,7 @@ public class ManagedRouteAddFromRouteTest extends ManagementTestSupport {
         }
 
         MBeanServer mbeanServer = getMBeanServer();
-        ObjectName route1 = ObjectName.getInstance("org.apache.camel:context=localhost/camel-1,type=routes,name=\"foo\"");
+        ObjectName route1 = ObjectName.getInstance("org.apache.camel:context=camel-1,type=routes,name=\"foo\"");
 
         // should be started
         String state = (String) mbeanServer.getAttribute(route1, "State");
@@ -85,7 +85,7 @@ public class ManagedRouteAddFromRouteTest extends ManagementTestSupport {
         result.assertIsSatisfied();
 
         // find the 2nd route
-        ObjectName route2 = ObjectName.getInstance("org.apache.camel:context=localhost/camel-1,type=routes,name=\"bar\"");
+        ObjectName route2 = ObjectName.getInstance("org.apache.camel:context=camel-1,type=routes,name=\"bar\"");
 
         // should be started
         state = (String) mbeanServer.getAttribute(route2, "State");

http://git-wip-us.apache.org/repos/asf/camel/blob/0e8aa70a/camel-core/src/test/java/org/apache/camel/management/ManagedRouteAddRemoveTest.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/management/ManagedRouteAddRemoveTest.java b/camel-core/src/test/java/org/apache/camel/management/ManagedRouteAddRemoveTest.java
index 2b61638..ed1bc29 100644
--- a/camel-core/src/test/java/org/apache/camel/management/ManagedRouteAddRemoveTest.java
+++ b/camel-core/src/test/java/org/apache/camel/management/ManagedRouteAddRemoveTest.java
@@ -54,7 +54,7 @@ public class ManagedRouteAddRemoveTest extends ManagementTestSupport {
         result.assertIsSatisfied();
 
         MBeanServer mbeanServer = getMBeanServer();
-        ObjectName on = ObjectName.getInstance("org.apache.camel:context=localhost/camel-1,type=services,*");
+        ObjectName on = ObjectName.getInstance("org.apache.camel:context=camel-1,type=services,*");
 
         // number of services
         Set<ObjectName> names = mbeanServer.queryNames(on, null);
@@ -101,7 +101,7 @@ public class ManagedRouteAddRemoveTest extends ManagementTestSupport {
         result.assertIsSatisfied();
 
         MBeanServer mbeanServer = getMBeanServer();
-        ObjectName on = ObjectName.getInstance("org.apache.camel:context=localhost/camel-1,type=services,*");
+        ObjectName on = ObjectName.getInstance("org.apache.camel:context=camel-1,type=services,*");
 
         // number of services
         Set<ObjectName> names = mbeanServer.queryNames(on, null);
@@ -148,7 +148,7 @@ public class ManagedRouteAddRemoveTest extends ManagementTestSupport {
         result.assertIsSatisfied();
 
         MBeanServer mbeanServer = getMBeanServer();
-        ObjectName on = ObjectName.getInstance("org.apache.camel:context=localhost/camel-1,type=services,*");
+        ObjectName on = ObjectName.getInstance("org.apache.camel:context=camel-1,type=services,*");
 
         // number of services
         Set<ObjectName> names = mbeanServer.queryNames(on, null);
@@ -195,7 +195,7 @@ public class ManagedRouteAddRemoveTest extends ManagementTestSupport {
         result.assertIsSatisfied();
 
         MBeanServer mbeanServer = getMBeanServer();
-        ObjectName on = ObjectName.getInstance("org.apache.camel:context=localhost/camel-1,type=services,*");
+        ObjectName on = ObjectName.getInstance("org.apache.camel:context=camel-1,type=services,*");
 
         // number of services
         Set<ObjectName> names = mbeanServer.queryNames(on, null);
@@ -253,7 +253,7 @@ public class ManagedRouteAddRemoveTest extends ManagementTestSupport {
         result.assertIsSatisfied();
 
         MBeanServer mbeanServer = getMBeanServer();
-        ObjectName on = ObjectName.getInstance("org.apache.camel:context=localhost/camel-1,type=services,*");
+        ObjectName on = ObjectName.getInstance("org.apache.camel:context=camel-1,type=services,*");
 
         // number of services
         Set<ObjectName> names = mbeanServer.queryNames(on, null);
@@ -312,7 +312,7 @@ public class ManagedRouteAddRemoveTest extends ManagementTestSupport {
         result.assertIsSatisfied();
 
         MBeanServer mbeanServer = getMBeanServer();
-        ObjectName on = ObjectName.getInstance("org.apache.camel:context=localhost/camel-1,type=services,*");
+        ObjectName on = ObjectName.getInstance("org.apache.camel:context=camel-1,type=services,*");
 
         // number of services
         Set<ObjectName> names = mbeanServer.queryNames(on, null);
@@ -369,7 +369,7 @@ public class ManagedRouteAddRemoveTest extends ManagementTestSupport {
         result.assertIsSatisfied();
 
         MBeanServer mbeanServer = getMBeanServer();
-        ObjectName on = ObjectName.getInstance("org.apache.camel:context=localhost/camel-1,type=services,*");
+        ObjectName on = ObjectName.getInstance("org.apache.camel:context=camel-1,type=services,*");
 
         // number of services
         Set<ObjectName> names = mbeanServer.queryNames(on, null);

http://git-wip-us.apache.org/repos/asf/camel/blob/0e8aa70a/camel-core/src/test/java/org/apache/camel/management/ManagedRouteAddSecondRouteNotRegisterNewRoutesTest.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/management/ManagedRouteAddSecondRouteNotRegisterNewRoutesTest.java b/camel-core/src/test/java/org/apache/camel/management/ManagedRouteAddSecondRouteNotRegisterNewRoutesTest.java
index 3ad73e7..a87a528 100644
--- a/camel-core/src/test/java/org/apache/camel/management/ManagedRouteAddSecondRouteNotRegisterNewRoutesTest.java
+++ b/camel-core/src/test/java/org/apache/camel/management/ManagedRouteAddSecondRouteNotRegisterNewRoutesTest.java
@@ -50,7 +50,7 @@ public class ManagedRouteAddSecondRouteNotRegisterNewRoutesTest extends Manageme
         }
 
         MBeanServer mbeanServer = getMBeanServer();
-        ObjectName route1 = ObjectName.getInstance("org.apache.camel:context=localhost/camel-1,type=routes,name=\"foo\"");
+        ObjectName route1 = ObjectName.getInstance("org.apache.camel:context=camel-1,type=routes,name=\"foo\"");
 
         // should be started
         String state = (String) mbeanServer.getAttribute(route1, "State");
@@ -67,7 +67,7 @@ public class ManagedRouteAddSecondRouteNotRegisterNewRoutesTest extends Manageme
         log.info(">>>>>>>>>>>>>>>>> adding 2nd route DONE <<<<<<<<<<<<<<");
 
         // find the 2nd route
-        ObjectName route2 = ObjectName.getInstance("org.apache.camel:context=localhost/camel-1,type=routes,name=\"bar\"");
+        ObjectName route2 = ObjectName.getInstance("org.apache.camel:context=camel-1,type=routes,name=\"bar\"");
 
         // should not be registered
         assertFalse("2nd route should not be registered", mbeanServer.isRegistered(route2));

http://git-wip-us.apache.org/repos/asf/camel/blob/0e8aa70a/camel-core/src/test/java/org/apache/camel/management/ManagedRouteAddSecondRouteTest.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/management/ManagedRouteAddSecondRouteTest.java b/camel-core/src/test/java/org/apache/camel/management/ManagedRouteAddSecondRouteTest.java
index a1c13f3..4f6158c 100644
--- a/camel-core/src/test/java/org/apache/camel/management/ManagedRouteAddSecondRouteTest.java
+++ b/camel-core/src/test/java/org/apache/camel/management/ManagedRouteAddSecondRouteTest.java
@@ -46,7 +46,7 @@ public class ManagedRouteAddSecondRouteTest extends ManagementTestSupport {
         }
 
         MBeanServer mbeanServer = getMBeanServer();
-        ObjectName route1 = ObjectName.getInstance("org.apache.camel:context=localhost/camel-1,type=routes,name=\"foo\"");
+        ObjectName route1 = ObjectName.getInstance("org.apache.camel:context=camel-1,type=routes,name=\"foo\"");
 
         // should be started
         String state = (String) mbeanServer.getAttribute(route1, "State");
@@ -63,7 +63,7 @@ public class ManagedRouteAddSecondRouteTest extends ManagementTestSupport {
         log.info(">>>>>>>>>>>>>>>>> adding 2nd route DONE <<<<<<<<<<<<<<");
 
         // find the 2nd route
-        ObjectName route2 = ObjectName.getInstance("org.apache.camel:context=localhost/camel-1,type=routes,name=\"bar\"");
+        ObjectName route2 = ObjectName.getInstance("org.apache.camel:context=camel-1,type=routes,name=\"bar\"");
 
         // should be started
         state = (String) mbeanServer.getAttribute(route2, "State");

http://git-wip-us.apache.org/repos/asf/camel/blob/0e8aa70a/camel-core/src/test/java/org/apache/camel/management/ManagedRouteAutoStartupTest.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/management/ManagedRouteAutoStartupTest.java b/camel-core/src/test/java/org/apache/camel/management/ManagedRouteAutoStartupTest.java
index 5134be4..c26a434 100644
--- a/camel-core/src/test/java/org/apache/camel/management/ManagedRouteAutoStartupTest.java
+++ b/camel-core/src/test/java/org/apache/camel/management/ManagedRouteAutoStartupTest.java
@@ -34,9 +34,9 @@ public class ManagedRouteAutoStartupTest extends ManagementTestSupport {
 
         MBeanServer mbeanServer = getMBeanServer();
 
-        ObjectName on = ObjectName.getInstance("org.apache.camel:context=localhost/camel-1,type=context,name=\"camel-1\"");
-        ObjectName onFoo = ObjectName.getInstance("org.apache.camel:context=localhost/camel-1,type=routes,name=\"foo\"");
-        ObjectName onBar = ObjectName.getInstance("org.apache.camel:context=localhost/camel-1,type=routes,name=\"bar\"");
+        ObjectName on = ObjectName.getInstance("org.apache.camel:context=camel-1,type=context,name=\"camel-1\"");
+        ObjectName onFoo = ObjectName.getInstance("org.apache.camel:context=camel-1,type=routes,name=\"foo\"");
+        ObjectName onBar = ObjectName.getInstance("org.apache.camel:context=camel-1,type=routes,name=\"bar\"");
 
         assertTrue("Should be registered", mbeanServer.isRegistered(on));
         String name = (String) mbeanServer.getAttribute(on, "CamelId");

http://git-wip-us.apache.org/repos/asf/camel/blob/0e8aa70a/camel-core/src/test/java/org/apache/camel/management/ManagedRouteContextTracerTest.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/management/ManagedRouteContextTracerTest.java b/camel-core/src/test/java/org/apache/camel/management/ManagedRouteContextTracerTest.java
index 331399b..578fd24 100644
--- a/camel-core/src/test/java/org/apache/camel/management/ManagedRouteContextTracerTest.java
+++ b/camel-core/src/test/java/org/apache/camel/management/ManagedRouteContextTracerTest.java
@@ -38,8 +38,8 @@ public class ManagedRouteContextTracerTest extends ManagementTestSupport {
 
         MBeanServer mbeanServer = getMBeanServer();
 
-        ObjectName on1 = ObjectName.getInstance("org.apache.camel:context=localhost/camel-1,type=routes,name=\"route1\"");
-        ObjectName on2 = ObjectName.getInstance("org.apache.camel:context=localhost/camel-1,type=routes,name=\"route2\"");
+        ObjectName on1 = ObjectName.getInstance("org.apache.camel:context=camel-1,type=routes,name=\"route1\"");
+        ObjectName on2 = ObjectName.getInstance("org.apache.camel:context=camel-1,type=routes,name=\"route2\"");
 
         // with tracing
         MockEndpoint traced = getMockEndpoint("mock:traced");

http://git-wip-us.apache.org/repos/asf/camel/blob/0e8aa70a/camel-core/src/test/java/org/apache/camel/management/ManagedRouteDumpStatsAsXmlTest.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/management/ManagedRouteDumpStatsAsXmlTest.java b/camel-core/src/test/java/org/apache/camel/management/ManagedRouteDumpStatsAsXmlTest.java
index f0dcc3c..7959172 100644
--- a/camel-core/src/test/java/org/apache/camel/management/ManagedRouteDumpStatsAsXmlTest.java
+++ b/camel-core/src/test/java/org/apache/camel/management/ManagedRouteDumpStatsAsXmlTest.java
@@ -35,7 +35,7 @@ public class ManagedRouteDumpStatsAsXmlTest extends ManagementTestSupport {
 
         // get the stats for the route
         MBeanServer mbeanServer = getMBeanServer();
-        ObjectName on = ObjectName.getInstance("org.apache.camel:context=localhost/camel-1,type=routes,name=\"foo\"");
+        ObjectName on = ObjectName.getInstance("org.apache.camel:context=camel-1,type=routes,name=\"foo\"");
 
         getMockEndpoint("mock:result").expectedMessageCount(1);
 

http://git-wip-us.apache.org/repos/asf/camel/blob/0e8aa70a/camel-core/src/test/java/org/apache/camel/management/ManagedRoutePerformanceCounterTest.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/management/ManagedRoutePerformanceCounterTest.java b/camel-core/src/test/java/org/apache/camel/management/ManagedRoutePerformanceCounterTest.java
index 59ff8ca..5b09ad6 100644
--- a/camel-core/src/test/java/org/apache/camel/management/ManagedRoutePerformanceCounterTest.java
+++ b/camel-core/src/test/java/org/apache/camel/management/ManagedRoutePerformanceCounterTest.java
@@ -35,7 +35,7 @@ public class ManagedRoutePerformanceCounterTest extends ManagementTestSupport {
 
         // get the stats for the route
         MBeanServer mbeanServer = getMBeanServer();
-        ObjectName on = ObjectName.getInstance("org.apache.camel:context=localhost/camel-1,type=routes,name=\"route1\"");
+        ObjectName on = ObjectName.getInstance("org.apache.camel:context=camel-1,type=routes,name=\"route1\"");
 
         Long delta = (Long) mbeanServer.getAttribute(on, "DeltaProcessingTime");
         assertEquals(0, delta.intValue());

http://git-wip-us.apache.org/repos/asf/camel/blob/0e8aa70a/camel-core/src/test/java/org/apache/camel/management/ManagedRouteRemoveWireTapExplicitThreadPoolTest.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/management/ManagedRouteRemoveWireTapExplicitThreadPoolTest.java b/camel-core/src/test/java/org/apache/camel/management/ManagedRouteRemoveWireTapExplicitThreadPoolTest.java
index 6bcbd17..24e365f 100644
--- a/camel-core/src/test/java/org/apache/camel/management/ManagedRouteRemoveWireTapExplicitThreadPoolTest.java
+++ b/camel-core/src/test/java/org/apache/camel/management/ManagedRouteRemoveWireTapExplicitThreadPoolTest.java
@@ -39,7 +39,7 @@ public class ManagedRouteRemoveWireTapExplicitThreadPoolTest extends ManagementT
         }
 
         MBeanServer mbeanServer = getMBeanServer();
-        ObjectName on = ObjectName.getInstance("org.apache.camel:context=localhost/camel-1,type=routes,name=\"foo\"");
+        ObjectName on = ObjectName.getInstance("org.apache.camel:context=camel-1,type=routes,name=\"foo\"");
 
         getMockEndpoint("mock:result").expectedMessageCount(1);
         getMockEndpoint("mock:tap").expectedMessageCount(1);

http://git-wip-us.apache.org/repos/asf/camel/blob/0e8aa70a/camel-core/src/test/java/org/apache/camel/management/ManagedRouteRemoveWireTapTest.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/management/ManagedRouteRemoveWireTapTest.java b/camel-core/src/test/java/org/apache/camel/management/ManagedRouteRemoveWireTapTest.java
index ec45a7e..c93f9f8 100644
--- a/camel-core/src/test/java/org/apache/camel/management/ManagedRouteRemoveWireTapTest.java
+++ b/camel-core/src/test/java/org/apache/camel/management/ManagedRouteRemoveWireTapTest.java
@@ -35,7 +35,7 @@ public class ManagedRouteRemoveWireTapTest extends ManagementTestSupport {
         }
 
         MBeanServer mbeanServer = getMBeanServer();
-        ObjectName on = ObjectName.getInstance("org.apache.camel:context=localhost/camel-1,type=routes,name=\"foo\"");
+        ObjectName on = ObjectName.getInstance("org.apache.camel:context=camel-1,type=routes,name=\"foo\"");
 
         getMockEndpoint("mock:result").expectedMessageCount(1);
         getMockEndpoint("mock:tap").expectedMessageCount(1);

http://git-wip-us.apache.org/repos/asf/camel/blob/0e8aa70a/camel-core/src/test/java/org/apache/camel/management/ManagedSanitizeTest.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/management/ManagedSanitizeTest.java b/camel-core/src/test/java/org/apache/camel/management/ManagedSanitizeTest.java
index 7a1d07a..09fd8c0 100644
--- a/camel-core/src/test/java/org/apache/camel/management/ManagedSanitizeTest.java
+++ b/camel-core/src/test/java/org/apache/camel/management/ManagedSanitizeTest.java
@@ -37,7 +37,7 @@ public class ManagedSanitizeTest extends ManagementTestSupport {
     public void testSanitize() throws Exception {
         MBeanServer mbeanServer = getMBeanServer();
 
-        ObjectName name = ObjectName.getInstance("org.apache.camel:context=localhost/camel-1,type=endpoints,name=\"stub://foo\\?password=xxxxxx&username=foo\"");
+        ObjectName name = ObjectName.getInstance("org.apache.camel:context=camel-1,type=endpoints,name=\"stub://foo\\?password=xxxxxx&username=foo\"");
         assertTrue("Should be registered", mbeanServer.isRegistered(name));
         // TODO: fix browsable endpoint mbean
         // String uri = (String) mbeanServer.getAttribute(name, "EndpointUri");

http://git-wip-us.apache.org/repos/asf/camel/blob/0e8aa70a/camel-core/src/test/java/org/apache/camel/management/ManagedSedaEndpointTest.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/management/ManagedSedaEndpointTest.java b/camel-core/src/test/java/org/apache/camel/management/ManagedSedaEndpointTest.java
index 0e393a0..64dddd8 100644
--- a/camel-core/src/test/java/org/apache/camel/management/ManagedSedaEndpointTest.java
+++ b/camel-core/src/test/java/org/apache/camel/management/ManagedSedaEndpointTest.java
@@ -41,7 +41,7 @@ public class ManagedSedaEndpointTest extends ManagementTestSupport {
 
         MBeanServer mbeanServer = getMBeanServer();
 
-        ObjectName name = ObjectName.getInstance("org.apache.camel:context=localhost/camel-1,type=endpoints,name=\"seda://start\"");
+        ObjectName name = ObjectName.getInstance("org.apache.camel:context=camel-1,type=endpoints,name=\"seda://start\"");
         String uri = (String) mbeanServer.getAttribute(name, "EndpointUri");
         assertEquals("seda://start", uri);
 

http://git-wip-us.apache.org/repos/asf/camel/blob/0e8aa70a/camel-core/src/test/java/org/apache/camel/management/ManagedSendProcessorTest.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/management/ManagedSendProcessorTest.java b/camel-core/src/test/java/org/apache/camel/management/ManagedSendProcessorTest.java
index 87bb0cb..c720bdc 100644
--- a/camel-core/src/test/java/org/apache/camel/management/ManagedSendProcessorTest.java
+++ b/camel-core/src/test/java/org/apache/camel/management/ManagedSendProcessorTest.java
@@ -47,7 +47,7 @@ public class ManagedSendProcessorTest extends ManagementTestSupport {
         MBeanServer mbeanServer = getMBeanServer();
 
         // get the object name for the delayer
-        ObjectName on = ObjectName.getInstance("org.apache.camel:context=localhost/camel-1,type=processors,name=\"mysend\"");
+        ObjectName on = ObjectName.getInstance("org.apache.camel:context=camel-1,type=processors,name=\"mysend\"");
 
         // should be on route1
         String routeId = (String) mbeanServer.getAttribute(on, "RouteId");

http://git-wip-us.apache.org/repos/asf/camel/blob/0e8aa70a/camel-core/src/test/java/org/apache/camel/management/ManagedServiceUrlPathTest.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/management/ManagedServiceUrlPathTest.java b/camel-core/src/test/java/org/apache/camel/management/ManagedServiceUrlPathTest.java
index f04549a..06f0fcb 100644
--- a/camel-core/src/test/java/org/apache/camel/management/ManagedServiceUrlPathTest.java
+++ b/camel-core/src/test/java/org/apache/camel/management/ManagedServiceUrlPathTest.java
@@ -73,15 +73,15 @@ public class ManagedServiceUrlPathTest extends ManagementTestSupport {
         clientConnector = JMXConnectorFactory.connect(new JMXServiceURL(JMXSERVICEURL), null);
         MBeanServerConnection mbeanServer = clientConnector.getMBeanServerConnection();
 
-        ObjectName name = ObjectName.getInstance("org.apache.camel:context=localhost/camel-1,type=endpoints,name=\"direct://start\"");
+        ObjectName name = ObjectName.getInstance("org.apache.camel:context=camel-1,type=endpoints,name=\"direct://start\"");
         String uri = (String) mbeanServer.getAttribute(name, "EndpointUri");
         assertEquals("direct://start", uri);
 
-        name = ObjectName.getInstance("org.apache.camel:context=localhost/camel-1,type=endpoints,name=\"log://foo\"");
+        name = ObjectName.getInstance("org.apache.camel:context=camel-1,type=endpoints,name=\"log://foo\"");
         uri = (String) mbeanServer.getAttribute(name, "EndpointUri");
         assertEquals("log://foo", uri);
 
-        name = ObjectName.getInstance("org.apache.camel:context=localhost/camel-1,type=endpoints,name=\"mock://result\"");
+        name = ObjectName.getInstance("org.apache.camel:context=camel-1,type=endpoints,name=\"mock://result\"");
         uri = (String) mbeanServer.getAttribute(name, "EndpointUri");
         assertEquals("mock://result", uri);
 

http://git-wip-us.apache.org/repos/asf/camel/blob/0e8aa70a/camel-core/src/test/java/org/apache/camel/management/ManagedShutdownStrategyTest.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/management/ManagedShutdownStrategyTest.java b/camel-core/src/test/java/org/apache/camel/management/ManagedShutdownStrategyTest.java
index 9eefbab..e2b9c45 100644
--- a/camel-core/src/test/java/org/apache/camel/management/ManagedShutdownStrategyTest.java
+++ b/camel-core/src/test/java/org/apache/camel/management/ManagedShutdownStrategyTest.java
@@ -39,7 +39,7 @@ public class ManagedShutdownStrategyTest extends ManagementTestSupport {
 
         MBeanServer mbeanServer = getMBeanServer();
 
-        ObjectName on = ObjectName.getInstance("org.apache.camel:context=localhost/camel-1,type=context,name=\"camel-1\"");
+        ObjectName on = ObjectName.getInstance("org.apache.camel:context=camel-1,type=context,name=\"camel-1\"");
 
         Long timeout = (Long) mbeanServer.getAttribute(on, "Timeout");
         assertEquals(300, timeout.longValue());

http://git-wip-us.apache.org/repos/asf/camel/blob/0e8aa70a/camel-core/src/test/java/org/apache/camel/management/ManagedStatisticsTest.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/management/ManagedStatisticsTest.java b/camel-core/src/test/java/org/apache/camel/management/ManagedStatisticsTest.java
index ddb7f70..cf5f61f 100644
--- a/camel-core/src/test/java/org/apache/camel/management/ManagedStatisticsTest.java
+++ b/camel-core/src/test/java/org/apache/camel/management/ManagedStatisticsTest.java
@@ -75,11 +75,11 @@ public class ManagedStatisticsTest extends ManagementTestSupport {
         assertNull(lastFail);
 
         // should be 5 on the processors
-        ObjectName foo = ObjectName.getInstance("org.apache.camel:context=localhost/camel-1,type=processors,name=\"foo\"");
+        ObjectName foo = ObjectName.getInstance("org.apache.camel:context=camel-1,type=processors,name=\"foo\"");
         completed = (Long) mbeanServer.getAttribute(foo, "ExchangesCompleted");
         assertEquals(5, completed.longValue());
 
-        ObjectName mock = ObjectName.getInstance("org.apache.camel:context=localhost/camel-1,type=processors,name=\"mock\"");
+        ObjectName mock = ObjectName.getInstance("org.apache.camel:context=camel-1,type=processors,name=\"mock\"");
         completed = (Long) mbeanServer.getAttribute(mock, "ExchangesCompleted");
         assertEquals(5, completed.longValue());
     }

http://git-wip-us.apache.org/repos/asf/camel/blob/0e8aa70a/camel-core/src/test/java/org/apache/camel/management/ManagedStatisticsWithSplitterTest.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/management/ManagedStatisticsWithSplitterTest.java b/camel-core/src/test/java/org/apache/camel/management/ManagedStatisticsWithSplitterTest.java
index 98263e8..fdd035a 100644
--- a/camel-core/src/test/java/org/apache/camel/management/ManagedStatisticsWithSplitterTest.java
+++ b/camel-core/src/test/java/org/apache/camel/management/ManagedStatisticsWithSplitterTest.java
@@ -35,7 +35,7 @@ public class ManagedStatisticsWithSplitterTest extends ManagementTestSupport {
         // get the status for the route
         MBeanServer mbeanServer = getMBeanServer();
 
-        ObjectName on = ObjectName.getInstance("org.apache.camel:context=localhost/camel-1,type=routes,name=\"route-a\"");
+        ObjectName on = ObjectName.getInstance("org.apache.camel:context=camel-1,type=routes,name=\"route-a\"");
 
         // use route to get the total time
         Long completed = (Long) mbeanServer.getAttribute(on, "ExchangesCompleted");
@@ -50,22 +50,22 @@ public class ManagedStatisticsWithSplitterTest extends ManagementTestSupport {
         assertEquals(2, completed.longValue());
 
         // should be 2 on the foo
-        ObjectName foo = ObjectName.getInstance("org.apache.camel:context=localhost/camel-1,type=processors,name=\"foo\"");
+        ObjectName foo = ObjectName.getInstance("org.apache.camel:context=camel-1,type=processors,name=\"foo\"");
         completed = (Long) mbeanServer.getAttribute(foo, "ExchangesCompleted");
         assertEquals(2, completed.longValue());
 
         // should be 5 on the split sub route
-        ObjectName bar = ObjectName.getInstance("org.apache.camel:context=localhost/camel-1,type=processors,name=\"bar\"");
+        ObjectName bar = ObjectName.getInstance("org.apache.camel:context=camel-1,type=processors,name=\"bar\"");
         completed = (Long) mbeanServer.getAttribute(bar, "ExchangesCompleted");
         assertEquals(5, completed.longValue());
 
         // should be 2 on the mock
-        ObjectName mock = ObjectName.getInstance("org.apache.camel:context=localhost/camel-1,type=processors,name=\"mock\"");
+        ObjectName mock = ObjectName.getInstance("org.apache.camel:context=camel-1,type=processors,name=\"mock\"");
         completed = (Long) mbeanServer.getAttribute(mock, "ExchangesCompleted");
         assertEquals(2, completed.longValue());
 
         // should be 5 on route-b
-        on = ObjectName.getInstance("org.apache.camel:context=localhost/camel-1,type=routes,name=\"route-b\"");
+        on = ObjectName.getInstance("org.apache.camel:context=camel-1,type=routes,name=\"route-b\"");
         completed = (Long) mbeanServer.getAttribute(on, "ExchangesCompleted");
         assertEquals(5, completed.longValue());
     }

http://git-wip-us.apache.org/repos/asf/camel/blob/0e8aa70a/camel-core/src/test/java/org/apache/camel/management/ManagedStreamCachingStrategyTest.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/management/ManagedStreamCachingStrategyTest.java b/camel-core/src/test/java/org/apache/camel/management/ManagedStreamCachingStrategyTest.java
index 9816a35..fdd6f43 100644
--- a/camel-core/src/test/java/org/apache/camel/management/ManagedStreamCachingStrategyTest.java
+++ b/camel-core/src/test/java/org/apache/camel/management/ManagedStreamCachingStrategyTest.java
@@ -40,7 +40,7 @@ public class ManagedStreamCachingStrategyTest extends ManagementTestSupport {
 
         MBeanServer mbeanServer = getMBeanServer();
 
-        ObjectName on = ObjectName.getInstance("org.apache.camel:context=localhost/myCamel,type=services,*");
+        ObjectName on = ObjectName.getInstance("org.apache.camel:context=myCamel,type=services,*");
 
         // number of services
         Set<ObjectName> names = mbeanServer.queryNames(on, null);

http://git-wip-us.apache.org/repos/asf/camel/blob/0e8aa70a/camel-core/src/test/java/org/apache/camel/management/ManagedThreadPoolProfileTest.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/management/ManagedThreadPoolProfileTest.java b/camel-core/src/test/java/org/apache/camel/management/ManagedThreadPoolProfileTest.java
index 34534f3..9ad47c8 100644
--- a/camel-core/src/test/java/org/apache/camel/management/ManagedThreadPoolProfileTest.java
+++ b/camel-core/src/test/java/org/apache/camel/management/ManagedThreadPoolProfileTest.java
@@ -36,7 +36,7 @@ public class ManagedThreadPoolProfileTest extends ManagementTestSupport {
 
         MBeanServer mbeanServer = getMBeanServer();
 
-        ObjectName on = ObjectName.getInstance("org.apache.camel:context=localhost/camel-1,type=threadpools,name=\"threads1(threads)\"");
+        ObjectName on = ObjectName.getInstance("org.apache.camel:context=camel-1,type=threadpools,name=\"threads1(threads)\"");
 
         Boolean shutdown = (Boolean) mbeanServer.getAttribute(on, "Shutdown");
         assertEquals(false, shutdown.booleanValue());

http://git-wip-us.apache.org/repos/asf/camel/blob/0e8aa70a/camel-core/src/test/java/org/apache/camel/management/ManagedThreadPoolTest.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/management/ManagedThreadPoolTest.java b/camel-core/src/test/java/org/apache/camel/management/ManagedThreadPoolTest.java
index f63c03e..188cf6d 100644
--- a/camel-core/src/test/java/org/apache/camel/management/ManagedThreadPoolTest.java
+++ b/camel-core/src/test/java/org/apache/camel/management/ManagedThreadPoolTest.java
@@ -34,7 +34,7 @@ public class ManagedThreadPoolTest extends ManagementTestSupport {
 
         MBeanServer mbeanServer = getMBeanServer();
 
-        ObjectName on = ObjectName.getInstance("org.apache.camel:context=localhost/camel-1,type=threadpools,name=\"threads1(threads)\"");
+        ObjectName on = ObjectName.getInstance("org.apache.camel:context=camel-1,type=threadpools,name=\"threads1(threads)\"");
 
         Boolean shutdown = (Boolean) mbeanServer.getAttribute(on, "Shutdown");
         assertEquals(false, shutdown.booleanValue());

http://git-wip-us.apache.org/repos/asf/camel/blob/0e8aa70a/camel-core/src/test/java/org/apache/camel/management/ManagedThreadPoolWithIdTest.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/management/ManagedThreadPoolWithIdTest.java b/camel-core/src/test/java/org/apache/camel/management/ManagedThreadPoolWithIdTest.java
index d5b3799..a0c7755 100644
--- a/camel-core/src/test/java/org/apache/camel/management/ManagedThreadPoolWithIdTest.java
+++ b/camel-core/src/test/java/org/apache/camel/management/ManagedThreadPoolWithIdTest.java
@@ -34,7 +34,7 @@ public class ManagedThreadPoolWithIdTest extends ManagementTestSupport {
 
         MBeanServer mbeanServer = getMBeanServer();
 
-        ObjectName on = ObjectName.getInstance("org.apache.camel:context=localhost/camel-1,type=threadpools,name=\"myThreads(threads)\"");
+        ObjectName on = ObjectName.getInstance("org.apache.camel:context=camel-1,type=threadpools,name=\"myThreads(threads)\"");
 
         Boolean shutdown = (Boolean) mbeanServer.getAttribute(on, "Shutdown");
         assertEquals(false, shutdown.booleanValue());

http://git-wip-us.apache.org/repos/asf/camel/blob/0e8aa70a/camel-core/src/test/java/org/apache/camel/management/ManagedThrottlerTest.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/management/ManagedThrottlerTest.java b/camel-core/src/test/java/org/apache/camel/management/ManagedThrottlerTest.java
index feb3e1c..6eb9605 100644
--- a/camel-core/src/test/java/org/apache/camel/management/ManagedThrottlerTest.java
+++ b/camel-core/src/test/java/org/apache/camel/management/ManagedThrottlerTest.java
@@ -59,10 +59,10 @@ public class ManagedThrottlerTest extends ManagementTestSupport {
         MBeanServer mbeanServer = getMBeanServer();
 
         // get the object name for the delayer
-        ObjectName throttlerName = ObjectName.getInstance("org.apache.camel:context=localhost/camel-1,type=processors,name=\"mythrottler\"");
+        ObjectName throttlerName = ObjectName.getInstance("org.apache.camel:context=camel-1,type=processors,name=\"mythrottler\"");
 
         // use route to get the total time
-        ObjectName routeName = ObjectName.getInstance("org.apache.camel:context=localhost/camel-1,type=routes,name=\"route1\"");
+        ObjectName routeName = ObjectName.getInstance("org.apache.camel:context=camel-1,type=routes,name=\"route1\"");
         
         // reset the counters
         mbeanServer.invoke(routeName, "reset", null, null);
@@ -113,10 +113,10 @@ public class ManagedThrottlerTest extends ManagementTestSupport {
         // get the stats for the route
         MBeanServer mbeanServer = getMBeanServer();
         // get the object name for the delayer
-        ObjectName throttlerName = ObjectName.getInstance("org.apache.camel:context=localhost/camel-1,type=processors,name=\"mythrottler2\"");
+        ObjectName throttlerName = ObjectName.getInstance("org.apache.camel:context=camel-1,type=processors,name=\"mythrottler2\"");
 
         // use route to get the total time
-        ObjectName routeName = ObjectName.getInstance("org.apache.camel:context=localhost/camel-1,type=routes,name=\"route2\"");
+        ObjectName routeName = ObjectName.getInstance("org.apache.camel:context=camel-1,type=routes,name=\"route2\"");
 
         // reset the counters
         mbeanServer.invoke(routeName, "reset", null, null);
@@ -155,10 +155,10 @@ public class ManagedThrottlerTest extends ManagementTestSupport {
         // get the stats for the route
         MBeanServer mbeanServer = getMBeanServer();
         // get the object name for the delayer
-        ObjectName throttlerName = ObjectName.getInstance("org.apache.camel:context=localhost/camel-1,type=processors,name=\"mythrottler3\"");
+        ObjectName throttlerName = ObjectName.getInstance("org.apache.camel:context=camel-1,type=processors,name=\"mythrottler3\"");
 
         // use route to get the total time
-        ObjectName routeName = ObjectName.getInstance("org.apache.camel:context=localhost/camel-1,type=routes,name=\"route3\"");
+        ObjectName routeName = ObjectName.getInstance("org.apache.camel:context=camel-1,type=routes,name=\"route3\"");
 
         // reset the counters
         mbeanServer.invoke(routeName, "reset", null, null);
@@ -199,10 +199,10 @@ public class ManagedThrottlerTest extends ManagementTestSupport {
         // get the stats for the route
         MBeanServer mbeanServer = getMBeanServer();
         // get the object name for the delayer
-        ObjectName throttlerName = ObjectName.getInstance("org.apache.camel:context=localhost/camel-1,type=processors,name=\"mythrottler4\"");
+        ObjectName throttlerName = ObjectName.getInstance("org.apache.camel:context=camel-1,type=processors,name=\"mythrottler4\"");
 
         // use route to get the total time
-        ObjectName routeName = ObjectName.getInstance("org.apache.camel:context=localhost/camel-1,type=routes,name=\"route4\"");
+        ObjectName routeName = ObjectName.getInstance("org.apache.camel:context=camel-1,type=routes,name=\"route4\"");
 
         // reset the counters
         mbeanServer.invoke(routeName, "reset", null, null);
@@ -249,10 +249,10 @@ public class ManagedThrottlerTest extends ManagementTestSupport {
         // get the stats for the route
         MBeanServer mbeanServer = getMBeanServer();
         // get the object name for the delayer
-        ObjectName throttlerName = ObjectName.getInstance("org.apache.camel:context=localhost/camel-1,type=processors,name=\"mythrottler2\"");
+        ObjectName throttlerName = ObjectName.getInstance("org.apache.camel:context=camel-1,type=processors,name=\"mythrottler2\"");
 
         // use route to get the total time
-        ObjectName routeName = ObjectName.getInstance("org.apache.camel:context=localhost/camel-1,type=routes,name=\"route2\"");
+        ObjectName routeName = ObjectName.getInstance("org.apache.camel:context=camel-1,type=routes,name=\"route2\"");
 
         // reset the counters
         mbeanServer.invoke(routeName, "reset", null, null);
@@ -290,10 +290,10 @@ public class ManagedThrottlerTest extends ManagementTestSupport {
         // get the stats for the route
         MBeanServer mbeanServer = getMBeanServer();
         // get the object name for the delayer
-        ObjectName throttlerName = ObjectName.getInstance("org.apache.camel:context=localhost/camel-1,type=processors,name=\"mythrottler2\"");
+        ObjectName throttlerName = ObjectName.getInstance("org.apache.camel:context=camel-1,type=processors,name=\"mythrottler2\"");
 
         // use route to get the total time
-        ObjectName routeName = ObjectName.getInstance("org.apache.camel:context=localhost/camel-1,type=routes,name=\"route2\"");
+        ObjectName routeName = ObjectName.getInstance("org.apache.camel:context=camel-1,type=routes,name=\"route2\"");
 
         // reset the counters
         mbeanServer.invoke(routeName, "reset", null, null);

http://git-wip-us.apache.org/repos/asf/camel/blob/0e8aa70a/camel-core/src/test/java/org/apache/camel/management/ManagedTimerTest.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/management/ManagedTimerTest.java b/camel-core/src/test/java/org/apache/camel/management/ManagedTimerTest.java
index a4069d2..05b6408 100644
--- a/camel-core/src/test/java/org/apache/camel/management/ManagedTimerTest.java
+++ b/camel-core/src/test/java/org/apache/camel/management/ManagedTimerTest.java
@@ -37,7 +37,7 @@ public class ManagedTimerTest extends ManagementTestSupport {
 
         MBeanServer mbeanServer = getMBeanServer();
 
-        ObjectName name = ObjectName.getInstance("org.apache.camel:context=localhost/camel-1,type=endpoints,name=\"timer://foo\\?delay=5000&period=8000\"");
+        ObjectName name = ObjectName.getInstance("org.apache.camel:context=camel-1,type=endpoints,name=\"timer://foo\\?delay=5000&period=8000\"");
         assertEquals("Should be registered", true, mbeanServer.isRegistered(name));
 
         Long period = (Long) mbeanServer.getAttribute(name, "Period");

http://git-wip-us.apache.org/repos/asf/camel/blob/0e8aa70a/camel-core/src/test/java/org/apache/camel/management/ManagedTracerOptionsTest.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/management/ManagedTracerOptionsTest.java b/camel-core/src/test/java/org/apache/camel/management/ManagedTracerOptionsTest.java
index 37967d2..617a75a 100644
--- a/camel-core/src/test/java/org/apache/camel/management/ManagedTracerOptionsTest.java
+++ b/camel-core/src/test/java/org/apache/camel/management/ManagedTracerOptionsTest.java
@@ -36,7 +36,7 @@ public class ManagedTracerOptionsTest extends ManagementTestSupport {
 
         MBeanServer mbeanServer = getMBeanServer();
 
-        ObjectName on = new ObjectName("org.apache.camel:context=localhost/camel-1,type=tracer,name=Tracer");
+        ObjectName on = new ObjectName("org.apache.camel:context=camel-1,type=tracer,name=Tracer");
         mbeanServer.isRegistered(on);
 
         mbeanServer.setAttribute(on, new Attribute("Enabled", Boolean.TRUE));

http://git-wip-us.apache.org/repos/asf/camel/blob/0e8aa70a/camel-core/src/test/java/org/apache/camel/management/ManagedTypeConverterRegistryTest.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/management/ManagedTypeConverterRegistryTest.java b/camel-core/src/test/java/org/apache/camel/management/ManagedTypeConverterRegistryTest.java
index 6f1d624..ae63228 100644
--- a/camel-core/src/test/java/org/apache/camel/management/ManagedTypeConverterRegistryTest.java
+++ b/camel-core/src/test/java/org/apache/camel/management/ManagedTypeConverterRegistryTest.java
@@ -43,7 +43,7 @@ public class ManagedTypeConverterRegistryTest extends ManagementTestSupport {
 
         MBeanServer mbeanServer = getMBeanServer();
 
-        ObjectName on = ObjectName.getInstance("org.apache.camel:context=localhost/camel-1,type=services,*");
+        ObjectName on = ObjectName.getInstance("org.apache.camel:context=camel-1,type=services,*");
 
         // number of services
         Set<ObjectName> names = mbeanServer.queryNames(on, null);

http://git-wip-us.apache.org/repos/asf/camel/blob/0e8aa70a/camel-core/src/test/java/org/apache/camel/management/ManagedUnregisterCamelContextTest.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/management/ManagedUnregisterCamelContextTest.java b/camel-core/src/test/java/org/apache/camel/management/ManagedUnregisterCamelContextTest.java
index 3004dc6..4043b74 100644
--- a/camel-core/src/test/java/org/apache/camel/management/ManagedUnregisterCamelContextTest.java
+++ b/camel-core/src/test/java/org/apache/camel/management/ManagedUnregisterCamelContextTest.java
@@ -37,7 +37,7 @@ public class ManagedUnregisterCamelContextTest extends ManagementTestSupport {
         
         MBeanServer mbeanServer = getMBeanServer();
 
-        ObjectName on = ObjectName.getInstance("org.apache.camel:context=localhost/camel-1,type=context,name=\"camel-1\"");
+        ObjectName on = ObjectName.getInstance("org.apache.camel:context=camel-1,type=context,name=\"camel-1\"");
 
         assertTrue("Should be registered", mbeanServer.isRegistered(on));
         String name = (String) mbeanServer.getAttribute(on, "CamelId");

http://git-wip-us.apache.org/repos/asf/camel/blob/0e8aa70a/camel-core/src/test/java/org/apache/camel/management/ManagedUnregisterEndpointTest.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/management/ManagedUnregisterEndpointTest.java b/camel-core/src/test/java/org/apache/camel/management/ManagedUnregisterEndpointTest.java
index 1662409..2b1cc65 100644
--- a/camel-core/src/test/java/org/apache/camel/management/ManagedUnregisterEndpointTest.java
+++ b/camel-core/src/test/java/org/apache/camel/management/ManagedUnregisterEndpointTest.java
@@ -34,7 +34,7 @@ public class ManagedUnregisterEndpointTest extends ManagementTestSupport {
 
         MBeanServer mbeanServer = getMBeanServer();
 
-        ObjectName on = ObjectName.getInstance("org.apache.camel:context=localhost/camel-1,type=endpoints,name=\"mock://result\"");
+        ObjectName on = ObjectName.getInstance("org.apache.camel:context=camel-1,type=endpoints,name=\"mock://result\"");
 
         assertTrue("Should be registered", mbeanServer.isRegistered(on));
         String uri = (String) mbeanServer.getAttribute(on, "EndpointUri");

http://git-wip-us.apache.org/repos/asf/camel/blob/0e8aa70a/camel-core/src/test/java/org/apache/camel/management/ManagedUnregisterRouteTest.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/management/ManagedUnregisterRouteTest.java b/camel-core/src/test/java/org/apache/camel/management/ManagedUnregisterRouteTest.java
index 35c3f8e..8825488 100644
--- a/camel-core/src/test/java/org/apache/camel/management/ManagedUnregisterRouteTest.java
+++ b/camel-core/src/test/java/org/apache/camel/management/ManagedUnregisterRouteTest.java
@@ -34,7 +34,7 @@ public class ManagedUnregisterRouteTest extends ManagementTestSupport {
 
         MBeanServer mbeanServer = getMBeanServer();
 
-        ObjectName on = ObjectName.getInstance("org.apache.camel:context=localhost/camel-1,type=routes,name=\"route1\"");
+        ObjectName on = ObjectName.getInstance("org.apache.camel:context=camel-1,type=routes,name=\"route1\"");
 
         assertTrue("Should be registered", mbeanServer.isRegistered(on));
         String id = (String) mbeanServer.getAttribute(on, "RouteId");

http://git-wip-us.apache.org/repos/asf/camel/blob/0e8aa70a/camel-core/src/test/java/org/apache/camel/management/TwoManagedCamelContextAutoAssignedNameClashTest.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/management/TwoManagedCamelContextAutoAssignedNameClashTest.java b/camel-core/src/test/java/org/apache/camel/management/TwoManagedCamelContextAutoAssignedNameClashTest.java
index 7a74a98..80d2304 100644
--- a/camel-core/src/test/java/org/apache/camel/management/TwoManagedCamelContextAutoAssignedNameClashTest.java
+++ b/camel-core/src/test/java/org/apache/camel/management/TwoManagedCamelContextAutoAssignedNameClashTest.java
@@ -51,7 +51,7 @@ public class TwoManagedCamelContextAutoAssignedNameClashTest extends TestSupport
         assertTrue("Should be started", camel1.getStatus().isStarted());
 
         MBeanServer mbeanServer = camel1.getManagementStrategy().getManagementAgent().getMBeanServer();
-        ObjectName on = ObjectName.getInstance("org.apache.camel:context=localhost/" + camel1.getManagementName() + ",type=context,name=\"camel-1\"");
+        ObjectName on = ObjectName.getInstance("org.apache.camel:context=" + camel1.getManagementName() + ",type=context,name=\"camel-1\"");
         assertTrue("Should be registered", mbeanServer.isRegistered(on));
 
         // now cheat and reset the counter so we can test for a clash
@@ -59,7 +59,7 @@ public class TwoManagedCamelContextAutoAssignedNameClashTest extends TestSupport
 
         camel2 = createCamelContext();
         camel2.start();
-        ObjectName on2 = ObjectName.getInstance("org.apache.camel:context=localhost/" + camel2.getManagementName() + ",type=context,name=\"camel-1\"");
+        ObjectName on2 = ObjectName.getInstance("org.apache.camel:context=" + camel2.getManagementName() + ",type=context,name=\"camel-1\"");
         assertTrue("Should be registered", mbeanServer.isRegistered(on2));
 
         assertTrue("Should still be registered after name clash", mbeanServer.isRegistered(on));

http://git-wip-us.apache.org/repos/asf/camel/blob/0e8aa70a/camel-core/src/test/java/org/apache/camel/management/TwoManagedCamelContextClashTest.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/management/TwoManagedCamelContextClashTest.java b/camel-core/src/test/java/org/apache/camel/management/TwoManagedCamelContextClashTest.java
index 8dbfc17..3d88b05 100644
--- a/camel-core/src/test/java/org/apache/camel/management/TwoManagedCamelContextClashTest.java
+++ b/camel-core/src/test/java/org/apache/camel/management/TwoManagedCamelContextClashTest.java
@@ -57,12 +57,12 @@ public class TwoManagedCamelContextClashTest extends TestSupport {
         assertTrue("Should be started", camel1.getStatus().isStarted());
 
         MBeanServer mbeanServer = camel1.getManagementStrategy().getManagementAgent().getMBeanServer();
-        ObjectName on = ObjectName.getInstance("org.apache.camel:context=localhost/" + camel1.getManagementName() + ",type=context,name=\"foo\"");
+        ObjectName on = ObjectName.getInstance("org.apache.camel:context=" + camel1.getManagementName() + ",type=context,name=\"foo\"");
         assertTrue("Should be registered", mbeanServer.isRegistered(on));
 
         // the default name pattern will ensure the JMX names is unique
         camel2.start();
-        ObjectName on2 = ObjectName.getInstance("org.apache.camel:context=localhost/" + camel2.getManagementName() + ",type=context,name=\"foo\"");
+        ObjectName on2 = ObjectName.getInstance("org.apache.camel:context=" + camel2.getManagementName() + ",type=context,name=\"foo\"");
         assertTrue("Should be registered", mbeanServer.isRegistered(on2));
 
         assertTrue("Should still be registered after name clash", mbeanServer.isRegistered(on));
@@ -77,12 +77,12 @@ public class TwoManagedCamelContextClashTest extends TestSupport {
         assertTrue("Should be started", camel1.getStatus().isStarted());
 
         MBeanServer mbeanServer = camel1.getManagementStrategy().getManagementAgent().getMBeanServer();
-        ObjectName on = ObjectName.getInstance("org.apache.camel:context=localhost/" + camel1.getManagementName() + ",type=context,name=\"foo\"");
+        ObjectName on = ObjectName.getInstance("org.apache.camel:context=" + camel1.getManagementName() + ",type=context,name=\"foo\"");
         assertTrue("Should be registered", mbeanServer.isRegistered(on));
 
         // the pattern has a counter so no clash
         camel2.start();
-        ObjectName on2 = ObjectName.getInstance("org.apache.camel:context=localhost/" + camel2.getManagementName() + ",type=context,name=\"foo\"");
+        ObjectName on2 = ObjectName.getInstance("org.apache.camel:context=" + camel2.getManagementName() + ",type=context,name=\"foo\"");
         assertTrue("Should be registered", mbeanServer.isRegistered(on2));
 
         assertTrue("Should still be registered after name clash", mbeanServer.isRegistered(on));
@@ -102,7 +102,7 @@ public class TwoManagedCamelContextClashTest extends TestSupport {
         assertTrue("Should be started", camel1.getStatus().isStarted());
 
         MBeanServer mbeanServer = camel1.getManagementStrategy().getManagementAgent().getMBeanServer();
-        ObjectName on = ObjectName.getInstance("org.apache.camel:context=localhost/" + camel1.getManagementName() + ",type=context,name=\"foo\"");
+        ObjectName on = ObjectName.getInstance("org.apache.camel:context=" + camel1.getManagementName() + ",type=context,name=\"foo\"");
         assertTrue("Should be registered", mbeanServer.isRegistered(on));
 
         // we use fixed names, so we will get a clash

http://git-wip-us.apache.org/repos/asf/camel/blob/0e8aa70a/camel-core/src/test/java/org/apache/camel/management/TwoManagedCamelContextTest.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/management/TwoManagedCamelContextTest.java b/camel-core/src/test/java/org/apache/camel/management/TwoManagedCamelContextTest.java
index 6c202ff..f22acb0 100644
--- a/camel-core/src/test/java/org/apache/camel/management/TwoManagedCamelContextTest.java
+++ b/camel-core/src/test/java/org/apache/camel/management/TwoManagedCamelContextTest.java
@@ -54,10 +54,10 @@ public class TwoManagedCamelContextTest extends TestSupport {
 
         MBeanServer mbeanServer = camel1.getManagementStrategy().getManagementAgent().getMBeanServer();
 
-        ObjectName on = ObjectName.getInstance("org.apache.camel:context=localhost/foo,type=context,name=\"foo\"");
+        ObjectName on = ObjectName.getInstance("org.apache.camel:context=foo,type=context,name=\"foo\"");
         assertTrue("Should be registered", mbeanServer.isRegistered(on));
 
-        ObjectName on2 = ObjectName.getInstance("org.apache.camel:context=localhost/bar,type=context,name=\"bar\"");
+        ObjectName on2 = ObjectName.getInstance("org.apache.camel:context=bar,type=context,name=\"bar\"");
         assertTrue("Should be registered", mbeanServer.isRegistered(on2));
 
         camel1.stop();

http://git-wip-us.apache.org/repos/asf/camel/blob/0e8aa70a/camel-core/src/test/java/org/apache/camel/management/TwoManagedNamePatternTest.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/management/TwoManagedNamePatternTest.java b/camel-core/src/test/java/org/apache/camel/management/TwoManagedNamePatternTest.java
index 70c7545..dccb29f 100644
--- a/camel-core/src/test/java/org/apache/camel/management/TwoManagedNamePatternTest.java
+++ b/camel-core/src/test/java/org/apache/camel/management/TwoManagedNamePatternTest.java
@@ -55,10 +55,10 @@ public class TwoManagedNamePatternTest extends TestSupport {
 
         MBeanServer mbeanServer = camel1.getManagementStrategy().getManagementAgent().getMBeanServer();
 
-        ObjectName on = ObjectName.getInstance("org.apache.camel:context=localhost/aaa-foo,type=context,name=\"foo\"");
+        ObjectName on = ObjectName.getInstance("org.apache.camel:context=aaa-foo,type=context,name=\"foo\"");
         assertTrue("Should be registered", mbeanServer.isRegistered(on));
 
-        ObjectName on2 = ObjectName.getInstance("org.apache.camel:context=localhost/bbb-bar,type=context,name=\"bar\"");
+        ObjectName on2 = ObjectName.getInstance("org.apache.camel:context=bbb-bar,type=context,name=\"bar\"");
         assertTrue("Should be registered", mbeanServer.isRegistered(on2));
 
         camel1.stop();

http://git-wip-us.apache.org/repos/asf/camel/blob/0e8aa70a/components/camel-core-xml/src/main/java/org/apache/camel/core/xml/AbstractCamelContextFactoryBean.java
----------------------------------------------------------------------
diff --git a/components/camel-core-xml/src/main/java/org/apache/camel/core/xml/AbstractCamelContextFactoryBean.java b/components/camel-core-xml/src/main/java/org/apache/camel/core/xml/AbstractCamelContextFactoryBean.java
index 621d645..d682ce1 100644
--- a/components/camel-core-xml/src/main/java/org/apache/camel/core/xml/AbstractCamelContextFactoryBean.java
+++ b/components/camel-core-xml/src/main/java/org/apache/camel/core/xml/AbstractCamelContextFactoryBean.java
@@ -366,6 +366,7 @@ public abstract class AbstractCamelContextFactoryBean<T extends ModelCamelContex
             agent.setOnlyRegisterProcessorWithCustomId(CamelContextHelper.parseBoolean(getContext(), camelJMXAgent.getOnlyRegisterProcessorWithCustomId()));
             agent.setRegisterAlways(CamelContextHelper.parseBoolean(getContext(), camelJMXAgent.getRegisterAlways()));
             agent.setRegisterNewRoutes(CamelContextHelper.parseBoolean(getContext(), camelJMXAgent.getRegisterNewRoutes()));
+            agent.setIncludeHostName(CamelContextHelper.parseBoolean(getContext(), camelJMXAgent.getIncludeHostName()));
             agent.setMask(CamelContextHelper.parseBoolean(getContext(), camelJMXAgent.getMask()));
 
             ManagementStrategy managementStrategy = new ManagedManagementStrategy(getContext(), agent);

http://git-wip-us.apache.org/repos/asf/camel/blob/0e8aa70a/components/camel-core-xml/src/main/java/org/apache/camel/core/xml/CamelJMXAgentDefinition.java
----------------------------------------------------------------------
diff --git a/components/camel-core-xml/src/main/java/org/apache/camel/core/xml/CamelJMXAgentDefinition.java b/components/camel-core-xml/src/main/java/org/apache/camel/core/xml/CamelJMXAgentDefinition.java
index 463c543..c7b0dd5 100644
--- a/components/camel-core-xml/src/main/java/org/apache/camel/core/xml/CamelJMXAgentDefinition.java
+++ b/components/camel-core-xml/src/main/java/org/apache/camel/core/xml/CamelJMXAgentDefinition.java
@@ -112,6 +112,12 @@ public class CamelJMXAgentDefinition extends IdentifiedType {
     private String loadStatisticsEnabled;
 
     /**
+     * A flag that indicates whether to include hostname in JMX MBean names.
+     */
+    @XmlAttribute
+    private String includeHostName = "false";
+
+    /**
      * A flag that indicates whether to remove detected sensitive information (such as passwords) from MBean names and attributes.
      */
     @XmlAttribute
@@ -221,6 +227,14 @@ public class CamelJMXAgentDefinition extends IdentifiedType {
         this.loadStatisticsEnabled = loadStatisticsEnabled;
     }
 
+    public String getIncludeHostName() {
+        return includeHostName;
+    }
+
+    public void setIncludeHostName(String includeHostName) {
+        this.includeHostName = includeHostName;
+    }
+
     public String getMask() {
         return mask;
     }
@@ -267,6 +281,9 @@ public class CamelJMXAgentDefinition extends IdentifiedType {
         if (registerNewRoutes != null) {
             sb.append(", registerNewRoutes=").append(registerNewRoutes);
         }
+        if (includeHostName != null) {
+            sb.append(", includeHostName=").append(includeHostName);
+        }
         if (mask != null) {
             sb.append(", mask=").append(mask);
         }

http://git-wip-us.apache.org/repos/asf/camel/blob/0e8aa70a/components/camel-jms/src/test/java/org/apache/camel/component/jms/ManagedJmsEndpointTest.java
----------------------------------------------------------------------
diff --git a/components/camel-jms/src/test/java/org/apache/camel/component/jms/ManagedJmsEndpointTest.java b/components/camel-jms/src/test/java/org/apache/camel/component/jms/ManagedJmsEndpointTest.java
index 08d82a5..d8e7744 100644
--- a/components/camel-jms/src/test/java/org/apache/camel/component/jms/ManagedJmsEndpointTest.java
+++ b/components/camel-jms/src/test/java/org/apache/camel/component/jms/ManagedJmsEndpointTest.java
@@ -59,7 +59,7 @@ public class ManagedJmsEndpointTest extends CamelTestSupport {
     public void testJmsEndpoint() throws Exception {
         MBeanServer mbeanServer = getMBeanServer();
 
-        ObjectName name = ObjectName.getInstance("org.apache.camel:context=localhost/camel-1,type=endpoints,name=\"activemq://queue:start\"");
+        ObjectName name = ObjectName.getInstance("org.apache.camel:context=camel-1,type=endpoints,name=\"activemq://queue:start\"");
         String uri = (String) mbeanServer.getAttribute(name, "EndpointUri");
         assertEquals("activemq://queue:start", uri);
 

http://git-wip-us.apache.org/repos/asf/camel/blob/0e8aa70a/components/camel-jms/src/test/java/org/apache/camel/component/jms/ManagedJmsEndpointTopicTest.java
----------------------------------------------------------------------
diff --git a/components/camel-jms/src/test/java/org/apache/camel/component/jms/ManagedJmsEndpointTopicTest.java b/components/camel-jms/src/test/java/org/apache/camel/component/jms/ManagedJmsEndpointTopicTest.java
index 81cd70c..9d05db5 100644
--- a/components/camel-jms/src/test/java/org/apache/camel/component/jms/ManagedJmsEndpointTopicTest.java
+++ b/components/camel-jms/src/test/java/org/apache/camel/component/jms/ManagedJmsEndpointTopicTest.java
@@ -59,7 +59,7 @@ public class ManagedJmsEndpointTopicTest extends CamelTestSupport {
     public void testJmsEndpoint() throws Exception {
         MBeanServer mbeanServer = getMBeanServer();
 
-        ObjectName name = ObjectName.getInstance("org.apache.camel:context=localhost/camel-1,type=endpoints,name=\"activemq://topic:start\"");
+        ObjectName name = ObjectName.getInstance("org.apache.camel:context=camel-1,type=endpoints,name=\"activemq://topic:start\"");
         String uri = (String) mbeanServer.getAttribute(name, "EndpointUri");
         assertEquals("activemq://topic:start", uri);
 

http://git-wip-us.apache.org/repos/asf/camel/blob/0e8aa70a/components/camel-jms/src/test/java/org/apache/camel/component/jms/tx/JMSTransactionIsTransactedRedeliveredTest.java
----------------------------------------------------------------------
diff --git a/components/camel-jms/src/test/java/org/apache/camel/component/jms/tx/JMSTransactionIsTransactedRedeliveredTest.java b/components/camel-jms/src/test/java/org/apache/camel/component/jms/tx/JMSTransactionIsTransactedRedeliveredTest.java
index 72becdf..802d7a1 100644
--- a/components/camel-jms/src/test/java/org/apache/camel/component/jms/tx/JMSTransactionIsTransactedRedeliveredTest.java
+++ b/components/camel-jms/src/test/java/org/apache/camel/component/jms/tx/JMSTransactionIsTransactedRedeliveredTest.java
@@ -75,7 +75,7 @@ public class JMSTransactionIsTransactedRedeliveredTest extends CamelSpringTestSu
         // need a little sleep to ensure JMX is updated
         Thread.sleep(500);
 
-        ObjectName name = ObjectName.getInstance("org.apache.camel:context=localhost/camel-1,type=routes,name=\"myRoute\"");
+        ObjectName name = ObjectName.getInstance("org.apache.camel:context=camel-1,type=routes,name=\"myRoute\"");
 
         Long total = (Long) getMBeanServer().getAttribute(name, "ExchangesTotal");
         assertEquals(3, total.intValue());

http://git-wip-us.apache.org/repos/asf/camel/blob/0e8aa70a/components/camel-netty-http/src/test/java/org/apache/camel/component/netty/http/ManagedNettyEndpointTest.java
----------------------------------------------------------------------
diff --git a/components/camel-netty-http/src/test/java/org/apache/camel/component/netty/http/ManagedNettyEndpointTest.java b/components/camel-netty-http/src/test/java/org/apache/camel/component/netty/http/ManagedNettyEndpointTest.java
index 986c1b7..3645192 100644
--- a/components/camel-netty-http/src/test/java/org/apache/camel/component/netty/http/ManagedNettyEndpointTest.java
+++ b/components/camel-netty-http/src/test/java/org/apache/camel/component/netty/http/ManagedNettyEndpointTest.java
@@ -62,11 +62,11 @@ public class ManagedNettyEndpointTest extends BaseNettyTest {
 
         MBeanServer mbeanServer = getMBeanServer();
 
-        ObjectName on = ObjectName.getInstance("org.apache.camel:context=localhost/camel-1,type=endpoints,name=\"http://0.0.0.0:" + getPort() + "/foo\"");
+        ObjectName on = ObjectName.getInstance("org.apache.camel:context=camel-1,type=endpoints,name=\"http://0.0.0.0:" + getPort() + "/foo\"");
         mbeanServer.isRegistered(on);
 
         // should only be 2 endpoints in JMX
-        Set<ObjectName> set = getMBeanServer().queryNames(new ObjectName("*:context=localhost/camel-1,type=endpoints,*"), null);
+        Set<ObjectName> set = getMBeanServer().queryNames(new ObjectName("*:context=camel-1,type=endpoints,*"), null);
         assertEquals(2, set.size());
     }
 

http://git-wip-us.apache.org/repos/asf/camel/blob/0e8aa70a/components/camel-servlet/src/test/java/org/apache/camel/component/servlet/ExposedServletEndpointURIToJMXTest.java
----------------------------------------------------------------------
diff --git a/components/camel-servlet/src/test/java/org/apache/camel/component/servlet/ExposedServletEndpointURIToJMXTest.java b/components/camel-servlet/src/test/java/org/apache/camel/component/servlet/ExposedServletEndpointURIToJMXTest.java
index 33d0b00..383b2ea 100644
--- a/components/camel-servlet/src/test/java/org/apache/camel/component/servlet/ExposedServletEndpointURIToJMXTest.java
+++ b/components/camel-servlet/src/test/java/org/apache/camel/component/servlet/ExposedServletEndpointURIToJMXTest.java
@@ -41,7 +41,7 @@ public class ExposedServletEndpointURIToJMXTest extends CamelTestSupport {
 
     private void checkServletEndpointURI(String servletEndpointURI) throws Exception {
         MBeanServer mbeanServer = context.getManagementStrategy().getManagementAgent().getMBeanServer();
-        ObjectName name = new ObjectName("org.apache.camel:context=*/camel-1,type=endpoints,name=" + servletEndpointURI);
+        ObjectName name = new ObjectName("org.apache.camel:context=camel-1,type=endpoints,name=" + servletEndpointURI);
         Set<ObjectName> objectNamesSet = mbeanServer.queryNames(name, null);
         assertEquals("Expect one MBean for the servlet endpoint", 1, objectNamesSet.size());
 

http://git-wip-us.apache.org/repos/asf/camel/blob/0e8aa70a/components/camel-spring/src/test/java/org/apache/camel/spring/management/SpringJmxDumpRoutesAsXmlIncludeHostNameTest.java
----------------------------------------------------------------------
diff --git a/components/camel-spring/src/test/java/org/apache/camel/spring/management/SpringJmxDumpRoutesAsXmlIncludeHostNameTest.java b/components/camel-spring/src/test/java/org/apache/camel/spring/management/SpringJmxDumpRoutesAsXmlIncludeHostNameTest.java
new file mode 100644
index 0000000..adca08d
--- /dev/null
+++ b/components/camel-spring/src/test/java/org/apache/camel/spring/management/SpringJmxDumpRoutesAsXmlIncludeHostNameTest.java
@@ -0,0 +1,57 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.spring.management;
+
+import javax.management.MBeanServer;
+import javax.management.ObjectName;
+
+import org.apache.camel.spring.SpringTestSupport;
+import org.springframework.context.support.AbstractXmlApplicationContext;
+import org.springframework.context.support.ClassPathXmlApplicationContext;
+
+/**
+ * @version 
+ */
+public class SpringJmxDumpRoutesAsXmlIncludeHostNameTest extends SpringTestSupport {
+
+    @Override
+    protected AbstractXmlApplicationContext createApplicationContext() {
+        return new ClassPathXmlApplicationContext("org/apache/camel/spring/management/SpringJmxDumpRouteAsXmlIncludeHostNameTest.xml");
+    }
+
+    protected MBeanServer getMBeanServer() {
+        return context.getManagementStrategy().getManagementAgent().getMBeanServer();
+    }
+
+    public void testJmxDumpRoutesAsXml() throws Exception {
+        MBeanServer mbeanServer = getMBeanServer();
+
+        ObjectName on = ObjectName.getInstance("org.apache.camel:context=localhost/camel-1,type=context,name=\"camel-1\"");
+        String xml = (String) mbeanServer.invoke(on, "dumpRoutesAsXml", null, null);
+        assertNotNull(xml);
+        log.info(xml);
+
+        assertTrue(xml.contains("route"));
+        assertTrue(xml.contains("myRoute"));
+        assertTrue(xml.contains("myOtherRoute"));
+        assertTrue(xml.contains("direct:start"));
+        assertTrue(xml.contains("mock:result"));
+        assertTrue(xml.contains("seda:bar"));
+        assertTrue(xml.contains("mock:bar"));
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/camel/blob/0e8aa70a/components/camel-spring/src/test/java/org/apache/camel/spring/management/SpringJmxDumpRoutesAsXmlTest.java
----------------------------------------------------------------------
diff --git a/components/camel-spring/src/test/java/org/apache/camel/spring/management/SpringJmxDumpRoutesAsXmlTest.java b/components/camel-spring/src/test/java/org/apache/camel/spring/management/SpringJmxDumpRoutesAsXmlTest.java
index 11ec292..ab384e4 100644
--- a/components/camel-spring/src/test/java/org/apache/camel/spring/management/SpringJmxDumpRoutesAsXmlTest.java
+++ b/components/camel-spring/src/test/java/org/apache/camel/spring/management/SpringJmxDumpRoutesAsXmlTest.java
@@ -40,7 +40,7 @@ public class SpringJmxDumpRoutesAsXmlTest extends SpringTestSupport {
     public void testJmxDumpRoutesAsXml() throws Exception {
         MBeanServer mbeanServer = getMBeanServer();
 
-        ObjectName on = ObjectName.getInstance("org.apache.camel:context=localhost/camel-1,type=context,name=\"camel-1\"");
+        ObjectName on = ObjectName.getInstance("org.apache.camel:context=camel-1,type=context,name=\"camel-1\"");
         String xml = (String) mbeanServer.invoke(on, "dumpRoutesAsXml", null, null);
         assertNotNull(xml);
         log.info(xml);

http://git-wip-us.apache.org/repos/asf/camel/blob/0e8aa70a/components/camel-spring/src/test/java/org/apache/camel/spring/management/SpringJmxEndpointInjectBeanRefTest.java
----------------------------------------------------------------------
diff --git a/components/camel-spring/src/test/java/org/apache/camel/spring/management/SpringJmxEndpointInjectBeanRefTest.java b/components/camel-spring/src/test/java/org/apache/camel/spring/management/SpringJmxEndpointInjectBeanRefTest.java
index 2b2c0c7..42d7e50 100644
--- a/components/camel-spring/src/test/java/org/apache/camel/spring/management/SpringJmxEndpointInjectBeanRefTest.java
+++ b/components/camel-spring/src/test/java/org/apache/camel/spring/management/SpringJmxEndpointInjectBeanRefTest.java
@@ -40,10 +40,10 @@ public class SpringJmxEndpointInjectBeanRefTest extends SpringTestSupport {
     public void testJmxEndpointInjectBean() throws Exception {
         MBeanServer mbeanServer = getMBeanServer();
 
-        ObjectName on = ObjectName.getInstance("org.apache.camel:context=localhost/camel-1,type=components,name=\"seda\"");
+        ObjectName on = ObjectName.getInstance("org.apache.camel:context=camel-1,type=components,name=\"seda\"");
         assertTrue(mbeanServer.isRegistered(on));
 
-        on = ObjectName.getInstance("org.apache.camel:context=localhost/camel-1,type=endpoints,name=\"seda://foo\"");
+        on = ObjectName.getInstance("org.apache.camel:context=camel-1,type=endpoints,name=\"seda://foo\"");
         assertTrue(mbeanServer.isRegistered(on));
         String uri = (String) mbeanServer.getAttribute(on, "EndpointUri");
         assertEquals("seda://foo", uri);

http://git-wip-us.apache.org/repos/asf/camel/blob/0e8aa70a/components/camel-spring/src/test/java/org/apache/camel/spring/management/SpringJmxEndpointInjectBeanRefTwoTest.java
----------------------------------------------------------------------
diff --git a/components/camel-spring/src/test/java/org/apache/camel/spring/management/SpringJmxEndpointInjectBeanRefTwoTest.java b/components/camel-spring/src/test/java/org/apache/camel/spring/management/SpringJmxEndpointInjectBeanRefTwoTest.java
index 988d8b8..2b427b7 100644
--- a/components/camel-spring/src/test/java/org/apache/camel/spring/management/SpringJmxEndpointInjectBeanRefTwoTest.java
+++ b/components/camel-spring/src/test/java/org/apache/camel/spring/management/SpringJmxEndpointInjectBeanRefTwoTest.java
@@ -40,10 +40,10 @@ public class SpringJmxEndpointInjectBeanRefTwoTest extends SpringTestSupport {
     public void testJmxEndpointInjectBean() throws Exception {
         MBeanServer mbeanServer = getMBeanServer();
 
-        ObjectName on = ObjectName.getInstance("org.apache.camel:context=localhost/camel-1,type=components,name=\"seda\"");
+        ObjectName on = ObjectName.getInstance("org.apache.camel:context=camel-1,type=components,name=\"seda\"");
         assertTrue(mbeanServer.isRegistered(on));
 
-        on = ObjectName.getInstance("org.apache.camel:context=localhost/camel-1,type=endpoints,name=\"seda://foo\"");
+        on = ObjectName.getInstance("org.apache.camel:context=camel-1,type=endpoints,name=\"seda://foo\"");
         assertTrue(mbeanServer.isRegistered(on));
         String uri = (String) mbeanServer.getAttribute(on, "EndpointUri");
         assertEquals("seda://foo", uri);

http://git-wip-us.apache.org/repos/asf/camel/blob/0e8aa70a/components/camel-spring/src/test/java/org/apache/camel/spring/management/SpringJmxEndpointInjectBeanTest.java
----------------------------------------------------------------------
diff --git a/components/camel-spring/src/test/java/org/apache/camel/spring/management/SpringJmxEndpointInjectBeanTest.java b/components/camel-spring/src/test/java/org/apache/camel/spring/management/SpringJmxEndpointInjectBeanTest.java
index 41f31bd..679b385 100644
--- a/components/camel-spring/src/test/java/org/apache/camel/spring/management/SpringJmxEndpointInjectBeanTest.java
+++ b/components/camel-spring/src/test/java/org/apache/camel/spring/management/SpringJmxEndpointInjectBeanTest.java
@@ -40,10 +40,10 @@ public class SpringJmxEndpointInjectBeanTest extends SpringTestSupport {
     public void testJmxEndpointInjectBean() throws Exception {
         MBeanServer mbeanServer = getMBeanServer();
 
-        ObjectName on = ObjectName.getInstance("org.apache.camel:context=localhost/camel-1,type=components,name=\"seda\"");
+        ObjectName on = ObjectName.getInstance("org.apache.camel:context=camel-1,type=components,name=\"seda\"");
         assertTrue(mbeanServer.isRegistered(on));
 
-        on = ObjectName.getInstance("org.apache.camel:context=localhost/camel-1,type=endpoints,name=\"seda://foo\"");
+        on = ObjectName.getInstance("org.apache.camel:context=camel-1,type=endpoints,name=\"seda://foo\"");
         assertTrue(mbeanServer.isRegistered(on));
         String uri = (String) mbeanServer.getAttribute(on, "EndpointUri");
         assertEquals("seda://foo", uri);

http://git-wip-us.apache.org/repos/asf/camel/blob/0e8aa70a/components/camel-spring/src/test/java/org/apache/camel/spring/management/SpringJmxRecipientListRegisterAlwaysTest.java
----------------------------------------------------------------------
diff --git a/components/camel-spring/src/test/java/org/apache/camel/spring/management/SpringJmxRecipientListRegisterAlwaysTest.java b/components/camel-spring/src/test/java/org/apache/camel/spring/management/SpringJmxRecipientListRegisterAlwaysTest.java
index 35acd82..d44baa2 100644
--- a/components/camel-spring/src/test/java/org/apache/camel/spring/management/SpringJmxRecipientListRegisterAlwaysTest.java
+++ b/components/camel-spring/src/test/java/org/apache/camel/spring/management/SpringJmxRecipientListRegisterAlwaysTest.java
@@ -54,21 +54,21 @@ public class SpringJmxRecipientListRegisterAlwaysTest extends SpringTestSupport
         MBeanServer mbeanServer = getMBeanServer();
 
         // this endpoint is part of the route and should be registered
-        ObjectName name = ObjectName.getInstance("org.apache.camel:context=localhost/camel-1,type=endpoints,name=\"direct://a\"");
+        ObjectName name = ObjectName.getInstance("org.apache.camel:context=camel-1,type=endpoints,name=\"direct://a\"");
         assertTrue("Should be registered", mbeanServer.isRegistered(name));
 
         // endpoints added after routes has been started is now also registered
-        name = ObjectName.getInstance("org.apache.camel:context=localhost/camel-1,type=endpoints,name=\"mock://x\"");
+        name = ObjectName.getInstance("org.apache.camel:context=camel-1,type=endpoints,name=\"mock://x\"");
         assertTrue("Should be registered", mbeanServer.isRegistered(name));
 
-        name = ObjectName.getInstance("org.apache.camel:context=localhost/camel-1,type=endpoints,name=\"mock://y\"");
+        name = ObjectName.getInstance("org.apache.camel:context=camel-1,type=endpoints,name=\"mock://y\"");
         assertTrue("Should be registered", mbeanServer.isRegistered(name));
 
-        name = ObjectName.getInstance("org.apache.camel:context=localhost/camel-1,type=endpoints,name=\"mock://z\"");
+        name = ObjectName.getInstance("org.apache.camel:context=camel-1,type=endpoints,name=\"mock://z\"");
         assertTrue("Should be registered", mbeanServer.isRegistered(name));
 
         // however components is always registered
-        name = ObjectName.getInstance("org.apache.camel:context=localhost/camel-1,type=components,name=\"mock\"");
+        name = ObjectName.getInstance("org.apache.camel:context=camel-1,type=components,name=\"mock\"");
         assertTrue("Should be registered", mbeanServer.isRegistered(name));
     }
 


Mime
View raw message