cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r695484 - in /cxf/trunk: rt/core/src/main/java/org/apache/cxf/endpoint/ rt/management/src/main/java/org/apache/cxf/management/interceptor/ rt/management/src/test/java/org/apache/cxf/management/interceptor/ systests/src/test/java/org/apache/...
Date Mon, 15 Sep 2008 14:44:34 GMT
Author: dkulp
Date: Mon Sep 15 07:44:33 2008
New Revision: 695484

URL: http://svn.apache.org/viewvc?rev=695484&view=rev
Log:
[CXF-1792] Make the information in the mgmt console a bit easier to read. (Patch from Hadrian
Zbarcea applied)

Modified:
    cxf/trunk/rt/core/src/main/java/org/apache/cxf/endpoint/ManagedEndpoint.java
    cxf/trunk/rt/management/src/main/java/org/apache/cxf/management/interceptor/AbstractMessageResponseTimeInterceptor.java
    cxf/trunk/rt/management/src/test/java/org/apache/cxf/management/interceptor/AbstractMessageResponseTestBase.java
    cxf/trunk/systests/src/test/java/org/apache/cxf/systest/management/CountersClientServerTest.java

Modified: cxf/trunk/rt/core/src/main/java/org/apache/cxf/endpoint/ManagedEndpoint.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/core/src/main/java/org/apache/cxf/endpoint/ManagedEndpoint.java?rev=695484&r1=695483&r2=695484&view=diff
==============================================================================
--- cxf/trunk/rt/core/src/main/java/org/apache/cxf/endpoint/ManagedEndpoint.java (original)
+++ cxf/trunk/rt/core/src/main/java/org/apache/cxf/endpoint/ManagedEndpoint.java Mon Sep 15
07:44:33 2008
@@ -88,7 +88,7 @@
 
         String serviceName = ObjectName.quote(endpoint.getService().getName().toString());
         buffer.append(ManagementConstants.SERVICE_NAME_PROP + "=" + serviceName + ",");
-        String endpointName = ObjectName.quote(endpoint.getEndpointInfo().getName().toString());
+        String endpointName = ObjectName.quote(endpoint.getEndpointInfo().getName().getLocalPart());
         buffer.append(ManagementConstants.PORT_NAME_PROP + "=" + endpointName);
         
         //Use default domain name of server
@@ -110,8 +110,5 @@
                 mgr.unRegisterListener(this);                
             }
         }
-    }    
-    
-    
-    
+    }
 }

Modified: cxf/trunk/rt/management/src/main/java/org/apache/cxf/management/interceptor/AbstractMessageResponseTimeInterceptor.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/management/src/main/java/org/apache/cxf/management/interceptor/AbstractMessageResponseTimeInterceptor.java?rev=695484&r1=695483&r2=695484&view=diff
==============================================================================
--- cxf/trunk/rt/management/src/main/java/org/apache/cxf/management/interceptor/AbstractMessageResponseTimeInterceptor.java
(original)
+++ cxf/trunk/rt/management/src/main/java/org/apache/cxf/management/interceptor/AbstractMessageResponseTimeInterceptor.java
Mon Sep 15 07:44:33 2008
@@ -104,9 +104,9 @@
             OperationInfo opInfo = ex.get(OperationInfo.class);
             Endpoint endpoint = ex.get(Endpoint.class);
             
-            String portName = "\"" + endpoint.getEndpointInfo().getName() + "\"";
             String serviceName = "\"" + service.getName() + "\"";            
-            String operationName = "\"" + opInfo.getName().toString() + "\"";
+            String portName = "\"" + endpoint.getEndpointInfo().getName().getLocalPart()
+ "\"";
+            String operationName = "\"" + opInfo.getName().getLocalPart() + "\"";
             
             StringBuffer buffer = new StringBuffer();
             buffer.append(ManagementConstants.DEFAULT_DOMAIN_NAME + ":");

Modified: cxf/trunk/rt/management/src/test/java/org/apache/cxf/management/interceptor/AbstractMessageResponseTestBase.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/management/src/test/java/org/apache/cxf/management/interceptor/AbstractMessageResponseTestBase.java?rev=695484&r1=695483&r2=695484&view=diff
==============================================================================
--- cxf/trunk/rt/management/src/test/java/org/apache/cxf/management/interceptor/AbstractMessageResponseTestBase.java
(original)
+++ cxf/trunk/rt/management/src/test/java/org/apache/cxf/management/interceptor/AbstractMessageResponseTestBase.java
Mon Sep 15 07:44:33 2008
@@ -46,11 +46,11 @@
     protected static final String CLIENT_SERVICE_ONAME =
         "org.apache.cxf:type=Performance.Counter.Client,bus.id=cxf,service=\"" 
         + SERVICE_NAME.toString() + "\",port=\"" 
-        + PORT_NAME + "\"";
+        + PORT_NAME.getLocalPart() + "\"";
     protected static final String SERVER_SERVICE_ONAME = 
         "org.apache.cxf:type=Performance.Counter.Server,bus.id=cxf,service=\"" 
         + SERVICE_NAME.toString() + "\",port=\"" 
-        + PORT_NAME + "\"";
+        + PORT_NAME.getLocalPart() + "\"";
     protected ObjectName clientServiceCounterOName;
     protected ObjectName serverServiceCounterOName;
     protected ObjectName clientOperationCounterOName;
@@ -70,13 +70,9 @@
         clientServiceCounterOName = new ObjectName(CLIENT_SERVICE_ONAME);
         serverServiceCounterOName = new ObjectName(SERVER_SERVICE_ONAME);
         clientOperationCounterOName = new ObjectName(CLIENT_SERVICE_ONAME 
-                                               + ",operation=\"" 
-                                               + OPERATION_NAME.toString() + "\"");
+            + ",operation=\"" + OPERATION_NAME.getLocalPart() + "\"");
         serverOperationCounterOName = new ObjectName(SERVER_SERVICE_ONAME 
-                                                     + ",operation=\"" 
-                                                     + OPERATION_NAME.toString() + "\"");
-        
-        
+            + ",operation=\"" + OPERATION_NAME.getLocalPart() + "\"");
     }
     
     protected void setupCounterRepository(boolean increase, boolean isClient) {
@@ -95,7 +91,7 @@
         if (increase) {
             EasyMock.expect(bus.getId()).andReturn(Bus.DEFAULT_BUS_ID);
             cRepository.increaseCounter(EasyMock.eq(serviceCounterOName),
-                                               EasyMock.isA(MessageHandlingTimeRecorder.class));
+                EasyMock.isA(MessageHandlingTimeRecorder.class));
             EasyMock.expectLastCall();
             cRepository.increaseCounter(EasyMock.eq(operationCounterOName), 
                 EasyMock.isA(MessageHandlingTimeRecorder.class));

Modified: cxf/trunk/systests/src/test/java/org/apache/cxf/systest/management/CountersClientServerTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/management/CountersClientServerTest.java?rev=695484&r1=695483&r2=695484&view=diff
==============================================================================
--- cxf/trunk/systests/src/test/java/org/apache/cxf/systest/management/CountersClientServerTest.java
(original)
+++ cxf/trunk/systests/src/test/java/org/apache/cxf/systest/management/CountersClientServerTest.java
Mon Sep 15 07:44:33 2008
@@ -97,8 +97,7 @@
         
         MBeanServer mbs = im.getMBeanServer();
         ObjectName name = new ObjectName(ManagementConstants.DEFAULT_DOMAIN_NAME 
-                                         + ":" + ManagementConstants.BUS_ID_PROP
-                                         + "=cxf" + bus.hashCode() + ",*");        
+            + ":" + ManagementConstants.BUS_ID_PROP + "=cxf" + bus.hashCode() + ",*");  
     
         
         SOAPService service = new SOAPService();
         assertNotNull(service);        
@@ -116,8 +115,8 @@
         assertEquals("The Counters are not export to JMX: " + counterNames, 
                      4 + 3 , counterNames.size());
        
-        ObjectName sayHiCounter =  new ObjectName(ManagementConstants.DEFAULT_DOMAIN_NAME

-            + ":operation=\"{http://apache.org/hello_world_soap_http}sayHi\",*"); 
+        ObjectName sayHiCounter =  new ObjectName(
+            ManagementConstants.DEFAULT_DOMAIN_NAME + ":operation=\"sayHi\",*"); 
         
         Set s = mbs.queryNames(sayHiCounter, null);        
         Iterator it = s.iterator();
@@ -146,8 +145,8 @@
         counterNames = mbs.queryNames(name, null);
         assertEquals("The Counters are not export to JMX ", 6 + 3, counterNames.size());
         
-        ObjectName greetMeOneWayCounter =  new ObjectName(ManagementConstants.DEFAULT_DOMAIN_NAME

-            + ":operation=\"{http://apache.org/hello_world_soap_http}greetMeOneWay\",*");
+        ObjectName greetMeOneWayCounter =  new ObjectName(
+            ManagementConstants.DEFAULT_DOMAIN_NAME + ":operation=\"greetMeOneWay\",*");
         
         s = mbs.queryNames(greetMeOneWayCounter, null);        
         it = s.iterator();
@@ -157,8 +156,5 @@
             Object val = mbs.getAttribute(counterName, "NumInvocations");    
             assertEquals("Wrong Counters Number of Invocations", val, 1);
         }
-        
-       
     }
-    
 }



Mime
View raw message