diff options
| author | Rafael H. Schloming <rhs@apache.org> | 2008-08-15 08:42:15 +0000 |
|---|---|---|
| committer | Rafael H. Schloming <rhs@apache.org> | 2008-08-15 08:42:15 +0000 |
| commit | 5d7b36c4e5bacd6a0843f03797cd230aad7a929c (patch) | |
| tree | 4b5845ce8a2ba57d9d91dcef1bd3e4e8f897fa5b | |
| parent | b6a376a4797e4988cdae48e0e5395a9b1f4e9f85 (diff) | |
| download | qpid-python-5d7b36c4e5bacd6a0843f03797cd230aad7a929c.tar.gz | |
updated qpid.0-10/java to match trunk/qpid/java@686172
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/branches/qpid.0-10@686175 13f79535-47bb-0310-9956-ffa450edef68
| -rw-r--r-- | java/client/src/main/java/org/apache/qpid/client/BasicMessageConsumer.java | 2 | ||||
| -rw-r--r-- | java/systests/src/main/java/org/apache/qpid/client/MessageListenerTest.java | 10 |
2 files changed, 11 insertions, 1 deletions
diff --git a/java/client/src/main/java/org/apache/qpid/client/BasicMessageConsumer.java b/java/client/src/main/java/org/apache/qpid/client/BasicMessageConsumer.java index 01bb68c23e..dfd228370c 100644 --- a/java/client/src/main/java/org/apache/qpid/client/BasicMessageConsumer.java +++ b/java/client/src/main/java/org/apache/qpid/client/BasicMessageConsumer.java @@ -280,7 +280,7 @@ public abstract class BasicMessageConsumer<U> extends Closeable implements Messa Object o = _synchronousQueue.poll(); while (o != null) { - messageListener.onMessage((Message) o); + notifyMessage((AbstractJMSMessage) o); o = _synchronousQueue.poll(); } } diff --git a/java/systests/src/main/java/org/apache/qpid/client/MessageListenerTest.java b/java/systests/src/main/java/org/apache/qpid/client/MessageListenerTest.java index e1c0f0ccef..4c1d5ee9c1 100644 --- a/java/systests/src/main/java/org/apache/qpid/client/MessageListenerTest.java +++ b/java/systests/src/main/java/org/apache/qpid/client/MessageListenerTest.java @@ -152,6 +152,16 @@ public class MessageListenerTest extends QpidTestCase implements MessageListener // Should have recieved all async messages assertEquals(MSG_COUNT, receivedCount); + _clientConnection.close(); + + Connection conn = getConnection("guest", "guest"); + Session clientSession = conn.createSession(false, Session.AUTO_ACKNOWLEDGE); + Queue queue = clientSession.createQueue("message-listener-test-queue"); + MessageConsumer cons = clientSession.createConsumer(queue); + conn.start(); + + // check that the messages were actually dequeued + assertTrue(cons.receive(2000) == null); } public void onMessage(Message message) |
