diff options
Diffstat (limited to 'java/client/src/test/java/org/apache/qpid/example/publisher/FileMessageDispatcher.java')
-rw-r--r-- | java/client/src/test/java/org/apache/qpid/example/publisher/FileMessageDispatcher.java | 38 |
1 files changed, 22 insertions, 16 deletions
diff --git a/java/client/src/test/java/org/apache/qpid/example/publisher/FileMessageDispatcher.java b/java/client/src/test/java/org/apache/qpid/example/publisher/FileMessageDispatcher.java index 4dd58cf4a1..ca3e5ce3f5 100644 --- a/java/client/src/test/java/org/apache/qpid/example/publisher/FileMessageDispatcher.java +++ b/java/client/src/test/java/org/apache/qpid/example/publisher/FileMessageDispatcher.java @@ -1,3 +1,21 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ package org.apache.qpid.example.publisher; import org.apache.log4j.Logger; @@ -12,11 +30,7 @@ import javax.jms.JMSException; /** * Class that sends message files to the Publisher to distribute * using files as input - * Must set system properties for host etc or amend and use config props - * Author: Marnie McCormack - * Date: 20-Jul-2006 - * Time: 09:56:56 - * Copyright JPMorgan Chase 2006 + * Must set properties for host in properties file or uses in vm broker */ public class FileMessageDispatcher { @@ -29,7 +43,7 @@ public class FileMessageDispatcher { public static void main(String[] args) { - //Check command line args ok - must provide a path or file for us to run + //Check command line args ok - must provide a path or file for us to dispatch if (args.length == 0) { System.err.println("Usage: FileMessageDispatcher <filesToDispatch>" + ""); @@ -116,8 +130,6 @@ public class FileMessageDispatcher { /* * Returns a _publisher for a queue - * Using system properties to get connection info for now - * Must set using -D the host, client, queue, user, pwd, virtual path, archive path */ private static Publisher getPublisher() { @@ -126,14 +138,8 @@ public class FileMessageDispatcher { return _publisher; } - //Create _publisher using system properties - Properties props = System.getProperties(); - - //Create a _publisher using failover details - _publisher = new Publisher(props.getProperty(Statics.HOST_PROPERTY), - props.getProperty(Statics.CLIENT_PROPERTY), props.getProperty(Statics.QUEUE_PROPERTY), - props.getProperty(Statics.USER_PROPERTY), props.getProperty(Statics.PWD_PROPERTY), - props.getProperty(Statics.VIRTUAL_PATH_PROPERTY), props.getProperty(Statics.ARCHIVE_PATH)); + //Create a _publisher + _publisher = new Publisher(); _publisher.setName(DEFAULT_PUB_NAME); return _publisher; |