activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a..@apache.org
Subject svn commit: r411967 - in /incubator/activemq/trunk/tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool: JmsConsumerClient.java PerfMeasurementTool.java ReflectionUtil.java spi/ActiveMQPojoSPI.java
Date Tue, 06 Jun 2006 01:54:08 GMT
Author: aco
Date: Mon Jun  5 18:54:07 2006
New Revision: 411967

URL: http://svn.apache.org/viewvc?rev=411967&view=rev
Log:
Fix 1.4 - 1.5 compatibility issues

Modified:
    incubator/activemq/trunk/tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/JmsConsumerClient.java
    incubator/activemq/trunk/tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/PerfMeasurementTool.java
    incubator/activemq/trunk/tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/ReflectionUtil.java
    incubator/activemq/trunk/tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/spi/ActiveMQPojoSPI.java

Modified: incubator/activemq/trunk/tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/JmsConsumerClient.java
URL: http://svn.apache.org/viewvc/incubator/activemq/trunk/tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/JmsConsumerClient.java?rev=411967&r1=411966&r2=411967&view=diff
==============================================================================
--- incubator/activemq/trunk/tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/JmsConsumerClient.java
(original)
+++ incubator/activemq/trunk/tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/JmsConsumerClient.java
Mon Jun  5 18:54:07 2006
@@ -27,7 +27,8 @@
 import javax.jms.Topic;
 import javax.jms.Message;
 import java.util.Properties;
-import java.util.concurrent.atomic.AtomicInteger;
+
+import edu.emory.mathcs.backport.java.util.concurrent.atomic.AtomicInteger;
 
 public class JmsConsumerClient extends JmsPerformanceSupport {
     private static final Log log = LogFactory.getLog(JmsConsumerClient.class);

Modified: incubator/activemq/trunk/tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/PerfMeasurementTool.java
URL: http://svn.apache.org/viewvc/incubator/activemq/trunk/tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/PerfMeasurementTool.java?rev=411967&r1=411966&r2=411967&view=diff
==============================================================================
--- incubator/activemq/trunk/tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/PerfMeasurementTool.java
(original)
+++ incubator/activemq/trunk/tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/PerfMeasurementTool.java
Mon Jun  5 18:54:07 2006
@@ -29,14 +29,14 @@
 public class PerfMeasurementTool implements PerfEventListener, Runnable {
     public static final String PREFIX_CONFIG_SYSTEM_TEST = "sampler.";
 
-    private long duration = 5 * 60 * 1000; // 5 mins by default test duration
-    private long interval = 1000;          // 1 sec sample interval
-    private long rampUpTime = 1 * 60 * 1000; // 1 min default test ramp up time
+    private long duration     = 5 * 60 * 1000; // 5 mins by default test duration
+    private long interval     = 1000;          // 1 sec sample interval
+    private long rampUpTime   = 1 * 60 * 1000; // 1 min default test ramp up time
     private long rampDownTime = 1 * 60 * 1000; // 1 min default test ramp down time
-    private long sampleIndex = 0;
+    private long sampleIndex  = 0;
 
     private AtomicBoolean start = new AtomicBoolean(false);
-    private AtomicBoolean stop = new AtomicBoolean(false);
+    private AtomicBoolean stop  = new AtomicBoolean(false);
     private AtomicBoolean isRunning = new AtomicBoolean(false);
     private DataOutputStream dataDoutputStream = null;
     private Properties samplerSettings = new Properties();

Modified: incubator/activemq/trunk/tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/ReflectionUtil.java
URL: http://svn.apache.org/viewvc/incubator/activemq/trunk/tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/ReflectionUtil.java?rev=411967&r1=411966&r2=411967&view=diff
==============================================================================
--- incubator/activemq/trunk/tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/ReflectionUtil.java
(original)
+++ incubator/activemq/trunk/tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/ReflectionUtil.java
Mon Jun  5 18:54:07 2006
@@ -86,7 +86,7 @@
                 } else if (propertyType == Byte.TYPE) {
                     targetClass.getMethod(setterMethod, new Class[] {byte.class}).invoke(target,
new Object[] {Byte.valueOf(val)});
                 } else if (propertyType == Character.TYPE) {
-                    targetClass.getMethod(setterMethod, new Class[] {char.class}).invoke(target,
new Object[] {val.charAt(0)});
+                    targetClass.getMethod(setterMethod, new Class[] {char.class}).invoke(target,
new Object[] {new Character(val.charAt(0))});
                 }
             } else {
                 // Set String type
@@ -96,7 +96,7 @@
                 // For unknown object type, try to call the valueOf method of the object
                 // to convert the string to the target object type
                 } else {
-                    Object param = propertyType.getMethod("valueOf", new Class[] {String.class}).invoke(null,
val);
+                    Object param = propertyType.getMethod("valueOf", new Class[] {String.class}).invoke(null,
new Object[] {val});
                     targetClass.getMethod(setterMethod, new Class[] {propertyType}).invoke(target,
new Object[] {param});
                 }
             }

Modified: incubator/activemq/trunk/tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/spi/ActiveMQPojoSPI.java
URL: http://svn.apache.org/viewvc/incubator/activemq/trunk/tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/spi/ActiveMQPojoSPI.java?rev=411967&r1=411966&r2=411967&view=diff
==============================================================================
--- incubator/activemq/trunk/tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/spi/ActiveMQPojoSPI.java
(original)
+++ incubator/activemq/trunk/tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/spi/ActiveMQPojoSPI.java
Mon Jun  5 18:54:07 2006
@@ -74,17 +74,17 @@
 
         setting = settings.getProperty(KEY_ASYNC_SEND);
         if (setting != null && setting.length() > 0) {
-            factory.setUseAsyncSend(Boolean.parseBoolean(setting));
+            factory.setUseAsyncSend(Boolean.getBoolean(setting));
         }
 
         setting = settings.getProperty(KEY_ASYNC_DISPATCH);
         if (setting != null && setting.length() > 0) {
-            factory.setAsyncDispatch(Boolean.parseBoolean(setting));
+            factory.setAsyncDispatch(Boolean.getBoolean(setting));
         }
 
         setting = settings.getProperty(KEY_ASYNC_SESSION);
         if (setting != null && setting.length() > 0) {
-            factory.setAlwaysSessionAsync(Boolean.parseBoolean(setting));
+            factory.setAlwaysSessionAsync(Boolean.getBoolean(setting));
         }
 
         setting = settings.getProperty(KEY_CLOSE_TIMEOUT);
@@ -94,32 +94,32 @@
 
         setting = settings.getProperty(KEY_COPY_MSG_ON_SEND);
         if (setting != null && setting.length() > 0) {
-            factory.setCopyMessageOnSend(Boolean.parseBoolean(setting));
+            factory.setCopyMessageOnSend(Boolean.getBoolean(setting));
         }
 
         setting = settings.getProperty(KEY_DISABLE_TIMESTAMP);
         if (setting != null && setting.length() > 0) {
-            factory.setDisableTimeStampsByDefault(Boolean.parseBoolean(setting));
+            factory.setDisableTimeStampsByDefault(Boolean.getBoolean(setting));
         }
 
         setting = settings.getProperty(KEY_DEFER_OBJ_SERIAL);
         if (setting != null && setting.length() > 0) {
-            factory.setObjectMessageSerializationDefered(Boolean.parseBoolean(setting));
+            factory.setObjectMessageSerializationDefered(Boolean.getBoolean(setting));
         }
 
         setting = settings.getProperty(KEY_ON_SEND_PREP_MSG);
         if (setting != null && setting.length() > 0) {
-            factory.setOnSendPrepareMessageBody(Boolean.parseBoolean(setting));
+            factory.setOnSendPrepareMessageBody(Boolean.getBoolean(setting));
         }
 
         setting = settings.getProperty(KEY_OPTIM_ACK);
         if (setting != null && setting.length() > 0) {
-            factory.setOptimizeAcknowledge(Boolean.parseBoolean(setting));
+            factory.setOptimizeAcknowledge(Boolean.getBoolean(setting));
         }
 
         setting = settings.getProperty(KEY_OPTIM_DISPATCH);
         if (setting != null && setting.length() > 0) {
-            factory.setOptimizedMessageDispatch(Boolean.parseBoolean(setting));
+            factory.setOptimizedMessageDispatch(Boolean.getBoolean(setting));
         }
 
         setting = settings.getProperty(KEY_PREFETCH_QUEUE);
@@ -134,12 +134,12 @@
 
         setting = settings.getProperty(KEY_USE_COMPRESSION);
         if (setting != null && setting.length() > 0) {
-            factory.setUseCompression(Boolean.parseBoolean(setting));
+            factory.setUseCompression(Boolean.getBoolean(setting));
         }
 
         setting = settings.getProperty(KEY_USE_RETROACTIVE);
         if (setting != null && setting.length() > 0) {
-            factory.setUseRetroactiveConsumer(Boolean.parseBoolean(setting));
+            factory.setUseRetroactiveConsumer(Boolean.getBoolean(setting));
         }
     }
 }



Mime
View raw message