diff options
| author | Robert Godfrey <rgodfrey@apache.org> | 2013-09-26 10:19:19 +0000 |
|---|---|---|
| committer | Robert Godfrey <rgodfrey@apache.org> | 2013-09-26 10:19:19 +0000 |
| commit | 97bc49722766753312dbde7dcc18c57ebf43f04e (patch) | |
| tree | 7ea9af207774736a14d4ca67d0f57811e05c6d96 /qpid/java/amqp-1-0-common | |
| parent | 624734f4cd4eb584dfafd55f4de8933e155f224d (diff) | |
| download | qpid-python-97bc49722766753312dbde7dcc18c57ebf43f04e.tar.gz | |
QPID-4901 : Queue Browser hangs on reaching end of queue
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1526438 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/java/amqp-1-0-common')
3 files changed, 16 insertions, 4 deletions
diff --git a/qpid/java/amqp-1-0-common/src/main/java/org/apache/qpid/amqp_1_0/transport/LinkEndpoint.java b/qpid/java/amqp-1-0-common/src/main/java/org/apache/qpid/amqp_1_0/transport/LinkEndpoint.java index 3a7af39d8a..587d26026f 100644 --- a/qpid/java/amqp-1-0-common/src/main/java/org/apache/qpid/amqp_1_0/transport/LinkEndpoint.java +++ b/qpid/java/amqp-1-0-common/src/main/java/org/apache/qpid/amqp_1_0/transport/LinkEndpoint.java @@ -444,13 +444,25 @@ public abstract class LinkEndpoint<T extends LinkEventListener> sendFlow(_flowTransactionId != null); } + public void sendFlowWithEcho() + { + sendFlow(_flowTransactionId != null, true); + } + + public void sendFlow(boolean setTransactionId) { + sendFlow(setTransactionId, false); + } + + public void sendFlow(boolean setTransactionId, boolean echo) + { if(_state == State.ATTACHED || _state == State.ATTACH_SENT) { Flow flow = new Flow(); flow.setLinkCredit(_linkCredit); flow.setDeliveryCount(_deliveryCount); + flow.setEcho(echo); _lastSentCreditLimit = _linkCredit.add(_deliveryCount); flow.setAvailable(_available); flow.setDrain(_drain); diff --git a/qpid/java/amqp-1-0-common/src/main/java/org/apache/qpid/amqp_1_0/transport/ReceivingLinkEndpoint.java b/qpid/java/amqp-1-0-common/src/main/java/org/apache/qpid/amqp_1_0/transport/ReceivingLinkEndpoint.java index e5019f9479..8a5940658c 100644 --- a/qpid/java/amqp-1-0-common/src/main/java/org/apache/qpid/amqp_1_0/transport/ReceivingLinkEndpoint.java +++ b/qpid/java/amqp-1-0-common/src/main/java/org/apache/qpid/amqp_1_0/transport/ReceivingLinkEndpoint.java @@ -288,7 +288,7 @@ public class ReceivingLinkEndpoint extends LinkEndpoint<ReceivingLinkListener> setDrain(true); _creditWindow = false; _drainLimit = getDeliveryCount().add(getLinkCredit()); - sendFlow(); + sendFlowWithEcho(); getLock().notifyAll(); } } diff --git a/qpid/java/amqp-1-0-common/src/main/java/org/apache/qpid/amqp_1_0/type/messaging/codec/SourceConstructor.java b/qpid/java/amqp-1-0-common/src/main/java/org/apache/qpid/amqp_1_0/type/messaging/codec/SourceConstructor.java index 764fa222ee..be9b271f72 100644 --- a/qpid/java/amqp-1-0-common/src/main/java/org/apache/qpid/amqp_1_0/type/messaging/codec/SourceConstructor.java +++ b/qpid/java/amqp-1-0-common/src/main/java/org/apache/qpid/amqp_1_0/type/messaging/codec/SourceConstructor.java @@ -231,7 +231,7 @@ public class SourceConstructor extends DescribedTypeConstructor<Source> try { - obj.setDistributionMode( (DistributionMode) val ); + obj.setDistributionMode( StdDistMode.valueOf(val) ); } catch(ClassCastException e) { @@ -326,7 +326,7 @@ public class SourceConstructor extends DescribedTypeConstructor<Source> // TODO Error } } - + } @@ -360,7 +360,7 @@ public class SourceConstructor extends DescribedTypeConstructor<Source> // TODO Error } } - + } |
