From c6affa0bf08a3d26f436ebbdd4d8a0eaa030af60 Mon Sep 17 00:00:00 2001 From: Robert Gemmell Date: Thu, 6 Jun 2013 12:45:05 +0000 Subject: NO-JIRA: make the example usable though still horrible git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1490259 13f79535-47bb-0310-9956-ffa450edef68 --- .../src/main/java/org/apache/qpid/amqp_1_0/jms/example/Hello.java | 4 +++- .../main/java/org/apache/qpid/amqp_1_0/jms/example/hello.properties | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/java/amqp-1-0-client-jms/example/src/main/java/org/apache/qpid/amqp_1_0/jms/example/Hello.java b/java/amqp-1-0-client-jms/example/src/main/java/org/apache/qpid/amqp_1_0/jms/example/Hello.java index 3f6780c47d..500be792ba 100644 --- a/java/amqp-1-0-client-jms/example/src/main/java/org/apache/qpid/amqp_1_0/jms/example/Hello.java +++ b/java/amqp-1-0-client-jms/example/src/main/java/org/apache/qpid/amqp_1_0/jms/example/Hello.java @@ -59,7 +59,7 @@ public class Hello Session consumerSession = connection.createSession(false, Session.AUTO_ACKNOWLEDGE); - MessageConsumer messageConsumer = consumerSession.createConsumer(queue, "hello='true' and 7"); + MessageConsumer messageConsumer = consumerSession.createConsumer(queue, "hello='true'"); messageConsumer.setMessageListener(new MessageListener() { @@ -125,6 +125,7 @@ public class Hello } catch (JMSException e) { + System.out.println("Caught exception in onMessage(): " + e.getMessage()); e.printStackTrace(); //TODO } @@ -172,6 +173,7 @@ public class Hello } catch (Exception exp) { + System.out.println("Caught exception: " + exp.getMessage()); exp.printStackTrace(); } } diff --git a/java/amqp-1-0-client-jms/example/src/main/java/org/apache/qpid/amqp_1_0/jms/example/hello.properties b/java/amqp-1-0-client-jms/example/src/main/java/org/apache/qpid/amqp_1_0/jms/example/hello.properties index 930c2c15cc..e83a887cc9 100644 --- a/java/amqp-1-0-client-jms/example/src/main/java/org/apache/qpid/amqp_1_0/jms/example/hello.properties +++ b/java/amqp-1-0-client-jms/example/src/main/java/org/apache/qpid/amqp_1_0/jms/example/hello.properties @@ -20,7 +20,7 @@ java.naming.factory.initial = org.apache.qpid.amqp_1_0.jms.jndi.PropertiesFileIn # register some connection factories # connectionfactory.[jndiname] = [ConnectionURL] -connectionfactory.localhost = http://guest:guest@localhost/test?cliendId='test-client' +connectionfactory.localhost = amqp://guest:guest@localhost/test?cliendId='test-client' # Register an AMQP destination in JNDI -- cgit v1.2.1