summaryrefslogtreecommitdiff
path: root/qpid/java
diff options
context:
space:
mode:
authorRobert Godfrey <rgodfrey@apache.org>2014-02-18 09:32:09 +0000
committerRobert Godfrey <rgodfrey@apache.org>2014-02-18 09:32:09 +0000
commita255b0dc43174973ea5376227ab8f2332228eb8e (patch)
tree826827f3a984fc7b5020cf2a12e11268477b8561 /qpid/java
parent37e2f371b04760bf0b9641e3969b070dda38d451 (diff)
downloadqpid-python-a255b0dc43174973ea5376227ab8f2332228eb8e.tar.gz
QPID-5555 : Fix queue exclusivity issues
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1569245 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/java')
-rw-r--r--qpid/java/broker-core/src/main/java/org/apache/qpid/server/queue/SimpleAMQQueue.java5
1 files changed, 5 insertions, 0 deletions
diff --git a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/queue/SimpleAMQQueue.java b/qpid/java/broker-core/src/main/java/org/apache/qpid/server/queue/SimpleAMQQueue.java
index e7e45db58b..0135b11fb9 100644
--- a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/queue/SimpleAMQQueue.java
+++ b/qpid/java/broker-core/src/main/java/org/apache/qpid/server/queue/SimpleAMQQueue.java
@@ -670,6 +670,11 @@ abstract class SimpleAMQQueue<E extends QueueEntryImpl<E,Q,L>, Q extends SimpleA
boolean exclusive = optionSet.contains(Consumer.Option.EXCLUSIVE);
boolean isTransient = optionSet.contains(Consumer.Option.TRANSIENT);
+ if(exclusive && getConsumerCount() != 0)
+ {
+ throw new ExistingConsumerPreventsExclusive();
+ }
+
QueueConsumer<T,E,Q,L> consumer = new QueueConsumer<T,E,Q,L>(filters, messageClass,
optionSet.contains(Consumer.Option.ACQUIRES),
optionSet.contains(Consumer.Option.SEES_REQUEUES),