diff options
-rw-r--r-- | java/perftests/src/main/java/org/apache/qpid/requestreply/InitialContextHelper.java | 7 | ||||
-rw-r--r-- | java/perftests/src/main/java/org/apache/qpid/requestreply/PingPongProducer.java | 2 |
2 files changed, 8 insertions, 1 deletions
diff --git a/java/perftests/src/main/java/org/apache/qpid/requestreply/InitialContextHelper.java b/java/perftests/src/main/java/org/apache/qpid/requestreply/InitialContextHelper.java index 067aad4095..b684fd6b9b 100644 --- a/java/perftests/src/main/java/org/apache/qpid/requestreply/InitialContextHelper.java +++ b/java/perftests/src/main/java/org/apache/qpid/requestreply/InitialContextHelper.java @@ -42,7 +42,14 @@ public class InitialContextHelper ClassLoader cl = Thread.currentThread().getContextClassLoader(); // NB: Need to change path to reflect package if moving classes around ! InputStream is = cl.getResourceAsStream(propertyFile); + if( is != null ) + { fileProperties.load(is); return new InitialContext(fileProperties); + } + else + { + return new InitialContext(); + } } } 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 638f5ae8c0..6860b57d26 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 @@ -558,7 +558,7 @@ public class PingPongProducer implements Runnable /*, MessageListener*/, Excepti /**
* Holds the producer controlSession, needed to create ping messages.
*/
- protected Session _producerSession = (Session) _connection.createSession(_transacted, _ackMode);
+ protected Session _producerSession ;
/**
* Holds the destination where the response messages will arrive.
|