mirror of https://github.com/apache/activemq.git
Modify the producer and consumer system to recognize -D parameters
git-svn-id: https://svn.apache.org/repos/asf/incubator/activemq/trunk@417701 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
0dbcc1f4af
commit
a783a42f7a
|
@ -69,9 +69,13 @@ public class JmsConsumerSystem extends AbstractJmsClientSystem {
|
|||
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);
|
||||
}
|
||||
|
||||
|
|
|
@ -69,9 +69,13 @@ public class JmsProducerSystem extends AbstractJmsClientSystem {
|
|||
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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue