diff options
| author | Rajith Muditha Attapattu <rajith@apache.org> | 2012-12-07 22:53:05 +0000 |
|---|---|---|
| committer | Rajith Muditha Attapattu <rajith@apache.org> | 2012-12-07 22:53:05 +0000 |
| commit | 961ac4309693c21b5372ddbbd0865a5b721d2a54 (patch) | |
| tree | bd94189c333e68744a97073d62ce532d8abc373c /qpid/java/client | |
| parent | 40f06cfe5ea074e23ffa7a517386f80c3369542d (diff) | |
| download | qpid-python-961ac4309693c21b5372ddbbd0865a5b721d2a54.tar.gz | |
QPID-4497 Allow the exclusive property to be set for the subscription
queue.
QPID-3317 We now throw an exception if a subscription queue is marked
durable without providing a queue name.
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1418541 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/java/client')
| -rw-r--r-- | qpid/java/client/src/main/java/org/apache/qpid/client/AMQSession_0_10.java | 5 | ||||
| -rw-r--r-- | qpid/java/client/src/main/java/org/apache/qpid/client/messaging/address/AddressHelper.java | 2 |
2 files changed, 6 insertions, 1 deletions
diff --git a/qpid/java/client/src/main/java/org/apache/qpid/client/AMQSession_0_10.java b/qpid/java/client/src/main/java/org/apache/qpid/client/AMQSession_0_10.java index dc4a4be496..76a18b70d9 100644 --- a/qpid/java/client/src/main/java/org/apache/qpid/client/AMQSession_0_10.java +++ b/qpid/java/client/src/main/java/org/apache/qpid/client/AMQSession_0_10.java @@ -1329,6 +1329,11 @@ public class AMQSession_0_10 extends AMQSession<BasicMessageConsumer_0_10, Basic arguments.put(AddressHelper.NO_LOCAL, noLocal); } + if (link.isDurable() && queueName.startsWith("TempQueue")) + { + throw new AMQException("You cannot mark a subscription queue as durable without providing a name for the link."); + } + getQpidSession().queueDeclare(queueName, queueProps.getAlternateExchange(), arguments, queueProps.isAutoDelete() ? Option.AUTO_DELETE : Option.NONE, diff --git a/qpid/java/client/src/main/java/org/apache/qpid/client/messaging/address/AddressHelper.java b/qpid/java/client/src/main/java/org/apache/qpid/client/messaging/address/AddressHelper.java index 9b291b48f7..72fc74e19c 100644 --- a/qpid/java/client/src/main/java/org/apache/qpid/client/messaging/address/AddressHelper.java +++ b/qpid/java/client/src/main/java/org/apache/qpid/client/messaging/address/AddressHelper.java @@ -283,7 +283,7 @@ public class AddressHelper { MapAccessor xDeclareMapAccessor = new MapAccessor(xDeclareMap); queue.setAutoDelete(getBooleanProperty(xDeclareMapAccessor,AUTO_DELETE,true)); - queue.setAutoDelete(getBooleanProperty(xDeclareMapAccessor,EXCLUSIVE,true)); + queue.setExclusive(getBooleanProperty(xDeclareMapAccessor,EXCLUSIVE,true)); queue.setAlternateExchange(xDeclareMapAccessor.getString(ALT_EXCHANGE)); queue.setDeclareArgs((Map<String,Object>)xDeclareMap.get(ARGUMENTS)); } |
