activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a..@apache.org
Subject svn commit: r417701 - in /incubator/activemq/trunk/tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool: JmsConsumerSystem.java JmsProducerSystem.java
Date Wed, 28 Jun 2006 08:54:23 GMT
Author: aco
Date: Wed Jun 28 01:54:23 2006
New Revision: 417701

URL: http://svn.apache.org/viewvc?rev=417701&view=rev
Log:
Modify the producer and consumer system to recognize -D parameters

Modified:
    incubator/activemq/trunk/tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/JmsConsumerSystem.java
    incubator/activemq/trunk/tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/JmsProducerSystem.java

Modified: incubator/activemq/trunk/tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/JmsConsumerSystem.java
URL: http://svn.apache.org/viewvc/incubator/activemq/trunk/tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/JmsConsumerSystem.java?rev=417701&r1=417700&r2=417701&view=diff
==============================================================================
--- incubator/activemq/trunk/tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/JmsConsumerSystem.java
(original)
+++ incubator/activemq/trunk/tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/JmsConsumerSystem.java
Wed Jun 28 01:54:23 2006
@@ -69,9 +69,13 @@
     public static void main(String[] args) {
         Properties props = new Properties();
         for (int i=0; i<args.length; i++) {
-            int index = args[i].indexOf("=");
-            String key = args[i].substring(0, index);
-            String val = args[i].substring(index + 1);
+            String arg = args[i];
+            if (arg.startsWith("-D") || arg.startsWith("-d")) {
+                arg = arg.substring(2);
+            }
+            int index  = arg.indexOf("=");
+            String key = arg.substring(0, index);
+            String val = arg.substring(index + 1);
             props.setProperty(key, val);
         }
 

Modified: incubator/activemq/trunk/tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/JmsProducerSystem.java
URL: http://svn.apache.org/viewvc/incubator/activemq/trunk/tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/JmsProducerSystem.java?rev=417701&r1=417700&r2=417701&view=diff
==============================================================================
--- incubator/activemq/trunk/tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/JmsProducerSystem.java
(original)
+++ incubator/activemq/trunk/tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/JmsProducerSystem.java
Wed Jun 28 01:54:23 2006
@@ -69,9 +69,13 @@
     public static void main(String[] args) {
         Properties props = new Properties();
         for (int i=0; i<args.length; i++) {
-            int index = args[i].indexOf("=");
-            String key = args[i].substring(0, index);
-            String val = args[i].substring(index + 1);
+            String arg = args[i];
+            if (arg.startsWith("-D") || arg.startsWith("-d")) {
+                arg = arg.substring(2);
+            }
+            int index  = arg.indexOf("=");
+            String key = arg.substring(0, index);
+            String val = arg.substring(index + 1);
             props.setProperty(key, val);
         }
 



Mime
View raw message