diff options
author | Rajith Muditha Attapattu <rajith@apache.org> | 2010-09-22 01:40:37 +0000 |
---|---|---|
committer | Rajith Muditha Attapattu <rajith@apache.org> | 2010-09-22 01:40:37 +0000 |
commit | b38a087d7af289083163b3f2067e3e69e96c3b66 (patch) | |
tree | 32c56385f8aa55b87f9b47b9c29ac47006da41fa /java/client | |
parent | b6aecec6ef8c0a5c463f3ac4f5046e08ec5a0b75 (diff) | |
download | qpid-python-b38a087d7af289083163b3f2067e3e69e96c3b66.tar.gz |
QPID-2882
Modified the address helper class to check for the durable property in the node props for the target node and link props for the subscription queue.
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@999718 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'java/client')
-rw-r--r-- | java/client/src/main/java/org/apache/qpid/client/messaging/address/AddressHelper.java | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/java/client/src/main/java/org/apache/qpid/client/messaging/address/AddressHelper.java b/java/client/src/main/java/org/apache/qpid/client/messaging/address/AddressHelper.java index 0aa2257126..64d5b16db0 100644 --- a/java/client/src/main/java/org/apache/qpid/client/messaging/address/AddressHelper.java +++ b/java/client/src/main/java/org/apache/qpid/client/messaging/address/AddressHelper.java @@ -217,11 +217,7 @@ public class AddressHelper private void fillInCommonNodeArgs(Node node, Map parent, MapAccessor argsMap) { - if (nodeProps != null) - { - node.setDurable(nodeProps.getBoolean(DURABLE) == null ? false - : nodeProps.getBoolean(DURABLE)); - } + node.setDurable(getDurability(parent)); node.setAutoDelete(argsMap.getBoolean(AUTO_DELETE) == null ? false : argsMap.getBoolean(AUTO_DELETE)); node.setAlternateExchange(argsMap.getString(ALT_EXCHANGE)); @@ -231,6 +227,18 @@ public class AddressHelper node.setDeclareArgs((Map<String,Object>)getDeclareArgs(parent).get(ARGUMENTS)); } } + + private boolean getDurability(Map map) + { + if (map != null && map.get(DURABLE) != null) + { + return Boolean.parseBoolean((String)map.get(DURABLE)); + } + else + { + return false; + } + } /** * if the type == queue x-declare args from the node props is used. if the |