cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r1208233 - in /cxf/trunk/rt/core/src/main/java/org/apache/cxf/workqueue: WorkQueueImplMBeanWrapper.java WorkQueueManagerImplMBeanWrapper.java
Date Wed, 30 Nov 2011 03:21:08 GMT
Author: dkulp
Date: Wed Nov 30 03:21:07 2011
New Revision: 1208233

URL: http://svn.apache.org/viewvc?rev=1208233&view=rev
Log:
[CXF-3914] Use stringbuilder.append for setting up WQ stuff
Patch from Alexey Markevich applied.

Modified:
    cxf/trunk/rt/core/src/main/java/org/apache/cxf/workqueue/WorkQueueImplMBeanWrapper.java
    cxf/trunk/rt/core/src/main/java/org/apache/cxf/workqueue/WorkQueueManagerImplMBeanWrapper.java

Modified: cxf/trunk/rt/core/src/main/java/org/apache/cxf/workqueue/WorkQueueImplMBeanWrapper.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/core/src/main/java/org/apache/cxf/workqueue/WorkQueueImplMBeanWrapper.java?rev=1208233&r1=1208232&r2=1208233&view=diff
==============================================================================
--- cxf/trunk/rt/core/src/main/java/org/apache/cxf/workqueue/WorkQueueImplMBeanWrapper.java
(original)
+++ cxf/trunk/rt/core/src/main/java/org/apache/cxf/workqueue/WorkQueueImplMBeanWrapper.java
Wed Nov 30 03:21:07 2011
@@ -22,6 +22,7 @@ package org.apache.cxf.workqueue;
 import javax.management.JMException;
 import javax.management.ObjectName;
 
+import org.apache.cxf.Bus;
 import org.apache.cxf.management.ManagedComponent;
 import org.apache.cxf.management.ManagementConstants;
 import org.apache.cxf.management.annotation.ManagedAttribute;
@@ -102,24 +103,24 @@ public class WorkQueueImplMBeanWrapper i
 
     public ObjectName getObjectName() throws JMException {
         StringBuilder buffer = new StringBuilder();
-        buffer.append(ManagementConstants.DEFAULT_DOMAIN_NAME + ":");
+        buffer.append(ManagementConstants.DEFAULT_DOMAIN_NAME).append(':');
         if (!aWorkQueue.isShared()) {
-            String busId = "cxf";
+            String busId = Bus.DEFAULT_BUS_ID;
             if (manager instanceof WorkQueueManagerImpl) {
                 busId = ((WorkQueueManagerImpl)manager).getBus().getId();
             }
-            buffer.append(ManagementConstants.BUS_ID_PROP + "=" + busId + ",");
-            buffer.append(WorkQueueManagerImplMBeanWrapper.TYPE_VALUE + "=");
-            buffer.append(WorkQueueManagerImplMBeanWrapper.NAME_VALUE + ",");
+            buffer.append(ManagementConstants.BUS_ID_PROP).append('=').append(busId).append(',');
+            buffer.append(WorkQueueManagerImplMBeanWrapper.TYPE_VALUE).append('=');
+            buffer.append(WorkQueueManagerImplMBeanWrapper.NAME_VALUE).append(',');
         } else {
-            buffer.append(ManagementConstants.BUS_ID_PROP + "=Shared,");
+            buffer.append(ManagementConstants.BUS_ID_PROP).append("=Shared,");
             //buffer.append(WorkQueueManagerImplMBeanWrapper.TYPE_VALUE + "=Shared,");
         }
-        buffer.append(ManagementConstants.TYPE_PROP + "=" + TYPE_VALUE + ",");
-        buffer.append(ManagementConstants.NAME_PROP + "=" + aWorkQueue.getName());
-       
+        buffer.append(ManagementConstants.TYPE_PROP).append('=').append(TYPE_VALUE).append(',');
+        buffer.append(ManagementConstants.NAME_PROP).append('=').append(aWorkQueue.getName());
+
         //Use default domain name of server
         return new ObjectName(buffer.toString());
     }
-    
+
 }

Modified: cxf/trunk/rt/core/src/main/java/org/apache/cxf/workqueue/WorkQueueManagerImplMBeanWrapper.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/core/src/main/java/org/apache/cxf/workqueue/WorkQueueManagerImplMBeanWrapper.java?rev=1208233&r1=1208232&r2=1208233&view=diff
==============================================================================
--- cxf/trunk/rt/core/src/main/java/org/apache/cxf/workqueue/WorkQueueManagerImplMBeanWrapper.java
(original)
+++ cxf/trunk/rt/core/src/main/java/org/apache/cxf/workqueue/WorkQueueManagerImplMBeanWrapper.java
Wed Nov 30 03:21:07 2011
@@ -50,13 +50,12 @@ public class WorkQueueManagerImplMBeanWr
     }
       
     public ObjectName getObjectName() throws JMException {
-        
-        String busId = bus.getId();        
         StringBuilder buffer = new StringBuilder();
-        buffer.append(ManagementConstants.DEFAULT_DOMAIN_NAME + ":");
-        buffer.append(ManagementConstants.BUS_ID_PROP + "=" + busId + ",");
-        buffer.append("WorkQueueManager=" + NAME_VALUE);
-        buffer.append("," + ManagementConstants.TYPE_PROP + "=" + TYPE_VALUE);
+
+        buffer.append(ManagementConstants.DEFAULT_DOMAIN_NAME).append(':');
+        buffer.append(ManagementConstants.BUS_ID_PROP).append('=').append(bus.getId()).append(',');
+        buffer.append("WorkQueueManager=").append(NAME_VALUE);
+        buffer.append(',').append(ManagementConstants.TYPE_PROP).append('=').append(TYPE_VALUE);
 
         //Use default domain name of server
         return new ObjectName(buffer.toString());



Mime
View raw message