You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by ra...@apache.org on 2010/09/22 03:40:37 UTC
svn commit: r999718 -
/qpid/trunk/qpid/java/client/src/main/java/org/apache/qpid/client/messaging/address/AddressHelper.java
Author: rajith
Date: Wed Sep 22 01:40:37 2010
New Revision: 999718
URL: http://svn.apache.org/viewvc?rev=999718&view=rev
Log:
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.
Modified:
qpid/trunk/qpid/java/client/src/main/java/org/apache/qpid/client/messaging/address/AddressHelper.java
Modified: qpid/trunk/qpid/java/client/src/main/java/org/apache/qpid/client/messaging/address/AddressHelper.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/client/src/main/java/org/apache/qpid/client/messaging/address/AddressHelper.java?rev=999718&r1=999717&r2=999718&view=diff
==============================================================================
--- qpid/trunk/qpid/java/client/src/main/java/org/apache/qpid/client/messaging/address/AddressHelper.java (original)
+++ qpid/trunk/qpid/java/client/src/main/java/org/apache/qpid/client/messaging/address/AddressHelper.java Wed Sep 22 01:40:37 2010
@@ -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
---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project: http://qpid.apache.org
Use/Interact: mailto:commits-subscribe@qpid.apache.org