From cdc60ef815279e02b58953d528b4f872dc68b77b Mon Sep 17 00:00:00 2001 From: Arnaud Simon Date: Tue, 13 Nov 2007 10:57:46 +0000 Subject: Changed to use initial context helper git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@594482 13f79535-47bb-0310-9956-ffa450edef68 --- .../main/java/org/apache/qpid/requestreply/PingPongProducer.java | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'java') diff --git a/java/perftests/src/main/java/org/apache/qpid/requestreply/PingPongProducer.java b/java/perftests/src/main/java/org/apache/qpid/requestreply/PingPongProducer.java index c3689151d2..da6d6eb7d0 100644 --- a/java/perftests/src/main/java/org/apache/qpid/requestreply/PingPongProducer.java +++ b/java/perftests/src/main/java/org/apache/qpid/requestreply/PingPongProducer.java @@ -669,12 +669,9 @@ public class PingPongProducer implements Runnable, ExceptionListener // _log.debug("protected void createConnection(String clientID = " + clientID + "): called"); // _log.debug("Creating a connection for the message producer."); - File propsFile = new File(_fileProperties); - InputStream is = new FileInputStream(propsFile); - Properties properties = new Properties(); - properties.load(is); + - Context context = new InitialContext(properties); + Context context = InitialContextHelper.getInitialContext(_fileProperties); ConnectionFactory factory = (ConnectionFactory) context.lookup(_factoryName); _connection = factory.createConnection(_username, _password); -- cgit v1.2.1