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) {
|
public static void main(String[] args) {
|
||||||
Properties props = new Properties();
|
Properties props = new Properties();
|
||||||
for (int i=0; i<args.length; i++) {
|
for (int i=0; i<args.length; i++) {
|
||||||
int index = args[i].indexOf("=");
|
String arg = args[i];
|
||||||
String key = args[i].substring(0, index);
|
if (arg.startsWith("-D") || arg.startsWith("-d")) {
|
||||||
String val = args[i].substring(index + 1);
|
arg = arg.substring(2);
|
||||||
|
}
|
||||||
|
int index = arg.indexOf("=");
|
||||||
|
String key = arg.substring(0, index);
|
||||||
|
String val = arg.substring(index + 1);
|
||||||
props.setProperty(key, val);
|
props.setProperty(key, val);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -69,9 +69,13 @@ public class JmsProducerSystem extends AbstractJmsClientSystem {
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
Properties props = new Properties();
|
Properties props = new Properties();
|
||||||
for (int i=0; i<args.length; i++) {
|
for (int i=0; i<args.length; i++) {
|
||||||
int index = args[i].indexOf("=");
|
String arg = args[i];
|
||||||
String key = args[i].substring(0, index);
|
if (arg.startsWith("-D") || arg.startsWith("-d")) {
|
||||||
String val = args[i].substring(index + 1);
|
arg = arg.substring(2);
|
||||||
|
}
|
||||||
|
int index = arg.indexOf("=");
|
||||||
|
String key = arg.substring(0, index);
|
||||||
|
String val = arg.substring(index + 1);
|
||||||
props.setProperty(key, val);
|
props.setProperty(key, val);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue