diff options
3 files changed, 14 insertions, 27 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 41e7ed345b..5309b95eda 100644 --- a/java/client/test/src/org/apache/qpid/IBMPerfTest/JNDIBindConnectionFactory.java +++ b/java/client/test/src/org/apache/qpid/IBMPerfTest/JNDIBindConnectionFactory.java @@ -18,7 +18,8 @@ package org.apache.qpid.IBMPerfTest; import org.apache.qpid.client.AMQConnectionFactory; -import org.junit.Assert; +import org.apache.log4j.Logger; +import org.apache.log4j.Level; import javax.naming.Context; import javax.naming.InitialContext; @@ -26,7 +27,6 @@ import javax.naming.NamingException; import javax.jms.ConnectionFactory; import java.util.Hashtable; import java.io.File; -import java.io.IOException; import java.net.MalformedURLException; public class JNDIBindConnectionFactory @@ -39,6 +39,8 @@ public class JNDIBindConnectionFactory public static void main(String[] args) { + Logger.getRootLogger().setLevel(Level.OFF); + String connectionFactoryBinding = CONNECTION_FACTORY_BINDING; String provider = PROVIDER_URL; String contextFactory = FSCONTEXT_FACTORY; @@ -73,14 +75,7 @@ public class JNDIBindConnectionFactory if (provider.startsWith("file")) { File file = new File(provider.substring(provider.indexOf("://") + 3)); - try - { - System.out.println("File:" + file.toURL()); - } - catch (MalformedURLException e) - { - System.out.println(e); - } + if (file.exists() && !file.isDirectory()) { System.out.println("Couldn't make directory file already exists"); @@ -116,7 +111,7 @@ public class JNDIBindConnectionFactory // Create the initial context Context ctx = new InitialContext(env); -// Create the object to be bound + // Create the object to be bound ConnectionFactory factory = null; try 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 0efa7c235d..ec4c1814d4 100644 --- a/java/client/test/src/org/apache/qpid/IBMPerfTest/JNDIBindQueue.java +++ b/java/client/test/src/org/apache/qpid/IBMPerfTest/JNDIBindQueue.java @@ -21,6 +21,8 @@ import org.apache.qpid.client.AMQConnectionFactory; import org.apache.qpid.client.AMQConnection; import org.apache.qpid.client.AMQSession; import org.apache.qpid.client.AMQQueue; +import org.apache.log4j.Logger; +import org.apache.log4j.Level; import org.junit.Assert; import javax.naming.Context; @@ -145,6 +147,7 @@ public class JNDIBindQueue public static void main(String[] args) { + Logger.getRootLogger().setLevel(Level.OFF); String provider = JNDIBindQueue.PROVIDER_URL; String contextFactory = JNDIBindQueue.FSCONTEXT_FACTORY; @@ -175,14 +178,7 @@ public class JNDIBindQueue if (provider.startsWith("file")) { File file = new File(provider.substring(provider.indexOf("://") + 3)); - try - { - System.out.println("File:" + file.toURL()); - } - catch (MalformedURLException e) - { - System.out.println(e); - } + if (file.exists() && !file.isDirectory()) { System.out.println("Couldn't make directory file already exists"); 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 d5508c446d..b400f3d936 100644 --- a/java/client/test/src/org/apache/qpid/IBMPerfTest/JNDIBindTopic.java +++ b/java/client/test/src/org/apache/qpid/IBMPerfTest/JNDIBindTopic.java @@ -21,6 +21,8 @@ import org.apache.qpid.client.AMQConnection; import org.apache.qpid.client.AMQQueue; import org.apache.qpid.client.AMQSession; import org.apache.qpid.client.AMQTopic; +import org.apache.log4j.Logger; +import org.apache.log4j.Level; import javax.jms.*; import javax.naming.Context; @@ -145,6 +147,7 @@ public class JNDIBindTopic public static void main(String[] args) { + Logger.getRootLogger().setLevel(Level.OFF); String provider = JNDIBindTopic.PROVIDER_URL; String contextFactory = JNDIBindTopic.FSCONTEXT_FACTORY; @@ -176,14 +179,7 @@ public class JNDIBindTopic if (provider.startsWith("file")) { File file = new File(provider.substring(provider.indexOf("://") + 3)); - try - { - System.out.println("File:" + file.toURL()); - } - catch (MalformedURLException e) - { - System.out.println(e); - } + if (file.exists() && !file.isDirectory()) { System.out.println("Couldn't make directory file already exists"); |