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 | 6d6bdcbadc22531fbc97d8edf4341b0ec9f4b388 (patch) | |
| tree | d5680b3fcb3608b1e0113c93f9d922989f21ed15 /qpid/java/client/src/main | |
| parent | 881292d0e29884a20953e4a620e6b4dd00d79374 (diff) | |
| download | qpid-python-6d6bdcbadc22531fbc97d8edf4341b0ec9f4b388.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@999718 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/java/client/src/main')
| -rw-r--r-- | qpid/java/client/src/main/java/org/apache/qpid/client/messaging/address/AddressHelper.java | 18 |
1 files changed, 13 insertions, 5 deletions
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 0aa2257126..64d5b16db0 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 @@ -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 |
