summaryrefslogtreecommitdiff
path: root/java/client/test/src
diff options
context:
space:
mode:
authorMartin Ritchie <ritchiem@apache.org>2006-09-20 15:16:26 +0000
committerMartin Ritchie <ritchiem@apache.org>2006-09-20 15:16:26 +0000
commitdbfbcc3234b7cc4edf31ff1b13814b93be855441 (patch)
treeb3f959279fe40bba14ed4f6d7cccbd5046bb3a12 /java/client/test/src
parentcd66f6bb51e362d815911e094d71c8ff4b0344af (diff)
downloadqpid-python-dbfbcc3234b7cc4edf31ff1b13814b93be855441.tar.gz
Added / to default JNDI name as under linux java.io.temp is '/tmp' but under windows it is '.../Temp/'
Queue and Topic fixed null pointer condition where _connection is not established. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@448234 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'java/client/test/src')
-rw-r--r--java/client/test/src/org/apache/qpid/IBMPerfTest/JNDIBindConnectionFactory.java2
-rw-r--r--java/client/test/src/org/apache/qpid/IBMPerfTest/JNDIBindQueue.java7
-rw-r--r--java/client/test/src/org/apache/qpid/IBMPerfTest/JNDIBindTopic.java7
3 files changed, 11 insertions, 5 deletions
diff --git a/java/client/test/src/org/apache/qpid/IBMPerfTest/JNDIBindConnectionFactory.java b/java/client/test/src/org/apache/qpid/IBMPerfTest/JNDIBindConnectionFactory.java
index d0b9f99408..4bb83330e8 100644
--- a/java/client/test/src/org/apache/qpid/IBMPerfTest/JNDIBindConnectionFactory.java
+++ b/java/client/test/src/org/apache/qpid/IBMPerfTest/JNDIBindConnectionFactory.java
@@ -33,7 +33,7 @@ public class JNDIBindConnectionFactory
{
public static final String CONNECTION_FACTORY_BINDING = "amq/ConnectionFactory";
- public static final String DEFAULT_PROVIDER_FILE_PATH = System.getProperty("java.io.tmpdir") + "IBMPerfTestsJNDI";
+ public static final String DEFAULT_PROVIDER_FILE_PATH = System.getProperty("java.io.tmpdir") + "/IBMPerfTestsJNDI";
public static final String PROVIDER_URL = "file:/" + DEFAULT_PROVIDER_FILE_PATH;
public static final String FSCONTEXT_FACTORY = "com.sun.jndi.fscontext.RefFSContextFactory";
diff --git a/java/client/test/src/org/apache/qpid/IBMPerfTest/JNDIBindQueue.java b/java/client/test/src/org/apache/qpid/IBMPerfTest/JNDIBindQueue.java
index 3b3d7850d8..9a24c36e70 100644
--- a/java/client/test/src/org/apache/qpid/IBMPerfTest/JNDIBindQueue.java
+++ b/java/client/test/src/org/apache/qpid/IBMPerfTest/JNDIBindQueue.java
@@ -35,7 +35,7 @@ public class JNDIBindQueue
{
public static final String CONNECTION_FACTORY_BINDING = "amq/ConnectionFactory";
- public static final String DEFAULT_PROVIDER_FILE_PATH = System.getProperty("java.io.tmpdir") + "IBMPerfTestsJNDI";
+ public static final String DEFAULT_PROVIDER_FILE_PATH = System.getProperty("java.io.tmpdir") + "/IBMPerfTestsJNDI";
public static final String PROVIDER_URL = "file:/" + DEFAULT_PROVIDER_FILE_PATH;
public static final String FSCONTEXT_FACTORY = "com.sun.jndi.fscontext.RefFSContextFactory";
@@ -89,7 +89,10 @@ public class JNDIBindQueue
{
try
{
- _connection.close();
+ if (_connection != null)
+ {
+ _connection.close();
+ }
}
catch (JMSException closeE)
{
diff --git a/java/client/test/src/org/apache/qpid/IBMPerfTest/JNDIBindTopic.java b/java/client/test/src/org/apache/qpid/IBMPerfTest/JNDIBindTopic.java
index 437f3791c9..5a1d89ed2a 100644
--- a/java/client/test/src/org/apache/qpid/IBMPerfTest/JNDIBindTopic.java
+++ b/java/client/test/src/org/apache/qpid/IBMPerfTest/JNDIBindTopic.java
@@ -34,7 +34,7 @@ public class JNDIBindTopic
{
public static final String CONNECTION_FACTORY_BINDING = "amq/ConnectionFactory";
- public static final String DEFAULT_PROVIDER_FILE_PATH = System.getProperty("java.io.tmpdir") + "IBMPerfTestsJNDI";
+ public static final String DEFAULT_PROVIDER_FILE_PATH = System.getProperty("java.io.tmpdir") + "/IBMPerfTestsJNDI";
public static final String PROVIDER_URL = "file:/" + DEFAULT_PROVIDER_FILE_PATH;
public static final String FSCONTEXT_FACTORY = "com.sun.jndi.fscontext.RefFSContextFactory";
@@ -89,7 +89,10 @@ public class JNDIBindTopic
{
try
{
- _connection.close();
+ if (_connection != null)
+ {
+ _connection.close();
+ }
}
catch (JMSException closeE)
{