svn commit: r803402 - in /camel/trunk/camel-core/src: main/java/org/apache/camel/management/ test/java/org/apache/camel/management/

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r803402 - in /camel/trunk/camel-core/src: main/java/org/apache/camel/management/ test/java/org/apache/camel/management/

davsclaus-2
Author: davsclaus
Date: Wed Aug 12 07:42:39 2009
New Revision: 803402

URL: http://svn.apache.org/viewvc?rev=803402&view=rev
Log:
CAMEL-1903: Added context key in mbean name for CamelContext as well and fixed it to use its name in the name key.

Modified:
    camel/trunk/camel-core/src/main/java/org/apache/camel/management/CamelNamingStrategy.java
    camel/trunk/camel-core/src/test/java/org/apache/camel/management/JmxInstrumentationOnlyRegisterProcessorWithCustomIdTest.java
    camel/trunk/camel-core/src/test/java/org/apache/camel/management/JmxInstrumentationUsingDefaultsTest.java
    camel/trunk/camel-core/src/test/java/org/apache/camel/management/MultiInstanceProcessorTest.java

Modified: camel/trunk/camel-core/src/main/java/org/apache/camel/management/CamelNamingStrategy.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/management/CamelNamingStrategy.java?rev=803402&r1=803401&r2=803402&view=diff
==============================================================================
--- camel/trunk/camel-core/src/main/java/org/apache/camel/management/CamelNamingStrategy.java (original)
+++ camel/trunk/camel-core/src/main/java/org/apache/camel/management/CamelNamingStrategy.java Wed Aug 12 07:42:39 2009
@@ -78,7 +78,8 @@
         StringBuffer buffer = new StringBuffer();
         buffer.append(domainName).append(":");
         buffer.append(KEY_CONTEXT + "=").append(getContextId(context)).append(",");
-        buffer.append(KEY_NAME + "=").append("context");
+        buffer.append(KEY_TYPE + "=" + TYPE_CONTEXT + ",");
+        buffer.append(KEY_NAME + "=").append(ObjectName.quote(context.getName()));
         return createObjectName(buffer);
     }
 

Modified: camel/trunk/camel-core/src/test/java/org/apache/camel/management/JmxInstrumentationOnlyRegisterProcessorWithCustomIdTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/test/java/org/apache/camel/management/JmxInstrumentationOnlyRegisterProcessorWithCustomIdTest.java?rev=803402&r1=803401&r2=803402&view=diff
==============================================================================
--- camel/trunk/camel-core/src/test/java/org/apache/camel/management/JmxInstrumentationOnlyRegisterProcessorWithCustomIdTest.java (original)
+++ camel/trunk/camel-core/src/test/java/org/apache/camel/management/JmxInstrumentationOnlyRegisterProcessorWithCustomIdTest.java Wed Aug 12 07:42:39 2009
@@ -46,7 +46,7 @@
         Set s = mbsc.queryNames(new ObjectName(domainName + ":type=endpoints,*"), null);
         assertEquals("Could not find 2 endpoints: " + s, 6, s.size());
 
-        s = mbsc.queryNames(new ObjectName(domainName + ":name=context,*"), null);
+        s = mbsc.queryNames(new ObjectName(domainName + ":type=context,*"), null);
         assertEquals("Could not find 1 context: " + s, 1, s.size());
 
         s = mbsc.queryNames(new ObjectName(domainName + ":type=processors,*"), null);

Modified: camel/trunk/camel-core/src/test/java/org/apache/camel/management/JmxInstrumentationUsingDefaultsTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/test/java/org/apache/camel/management/JmxInstrumentationUsingDefaultsTest.java?rev=803402&r1=803401&r2=803402&view=diff
==============================================================================
--- camel/trunk/camel-core/src/test/java/org/apache/camel/management/JmxInstrumentationUsingDefaultsTest.java (original)
+++ camel/trunk/camel-core/src/test/java/org/apache/camel/management/JmxInstrumentationUsingDefaultsTest.java Wed Aug 12 07:42:39 2009
@@ -61,7 +61,7 @@
         Set s = mbsc.queryNames(new ObjectName(domainName + ":type=endpoints,*"), null);
         assertEquals("Could not find 2 endpoints: " + s, 2, s.size());
 
-        s = mbsc.queryNames(new ObjectName(domainName + ":name=context,*"), null);
+        s = mbsc.queryNames(new ObjectName(domainName + ":type=context,*"), null);
         assertEquals("Could not find 1 context: " + s, 1, s.size());
 
         s = mbsc.queryNames(new ObjectName(domainName + ":type=processors,*"), null);

Modified: camel/trunk/camel-core/src/test/java/org/apache/camel/management/MultiInstanceProcessorTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/test/java/org/apache/camel/management/MultiInstanceProcessorTest.java?rev=803402&r1=803401&r2=803402&view=diff
==============================================================================
--- camel/trunk/camel-core/src/test/java/org/apache/camel/management/MultiInstanceProcessorTest.java (original)
+++ camel/trunk/camel-core/src/test/java/org/apache/camel/management/MultiInstanceProcessorTest.java Wed Aug 12 07:42:39 2009
@@ -60,7 +60,7 @@
         Set s = mbsc.queryNames(new ObjectName(domainName + ":type=endpoints,*"), null);
         assertEquals("Could not find 2 endpoints: " + s, 2, s.size());
 
-        s = mbsc.queryNames(new ObjectName(domainName + ":name=context,*"), null);
+        s = mbsc.queryNames(new ObjectName(domainName + ":type=context,*"), null);
         assertEquals("Could not find 1 context: " + s, 1, s.size());
 
         s = mbsc.queryNames(new ObjectName(domainName + ":type=processors,*"), null);