diff options
author | antelder <antelder@13f79535-47bb-0310-9956-ffa450edef68> | 2010-08-12 18:01:21 +0000 |
---|---|---|
committer | antelder <antelder@13f79535-47bb-0310-9956-ffa450edef68> | 2010-08-12 18:01:21 +0000 |
commit | 43fb2caf65c85ef2b671ab70f125ea8a8a876295 (patch) | |
tree | f593551fcf12ff61e3f28b35ff0151d1fcfb05ba /sca-java-2.x/trunk/modules/binding-jms/src/main/java/org | |
parent | 7bba8a52cccbecfd2ca68cd7637d2dba7968afb9 (diff) |
Updates to get jms message selectors working properly
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@984878 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-java-2.x/trunk/modules/binding-jms/src/main/java/org')
-rw-r--r-- | sca-java-2.x/trunk/modules/binding-jms/src/main/java/org/apache/tuscany/sca/binding/jms/JMSBindingProcessor.java | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/sca-java-2.x/trunk/modules/binding-jms/src/main/java/org/apache/tuscany/sca/binding/jms/JMSBindingProcessor.java b/sca-java-2.x/trunk/modules/binding-jms/src/main/java/org/apache/tuscany/sca/binding/jms/JMSBindingProcessor.java index 30f842bced..cf2a468fce 100644 --- a/sca-java-2.x/trunk/modules/binding-jms/src/main/java/org/apache/tuscany/sca/binding/jms/JMSBindingProcessor.java +++ b/sca-java-2.x/trunk/modules/binding-jms/src/main/java/org/apache/tuscany/sca/binding/jms/JMSBindingProcessor.java @@ -373,6 +373,15 @@ public class JMSBindingProcessor extends BaseStAXArtifactProcessor implements St jmsBinding.setJMSPriority(Integer.parseInt(s.substring(9))); } else if (s.startsWith("timeToLive=")) { jmsBinding.setJMSTimeToLive(Long.parseLong(s.substring(11))); + } else if (s.startsWith("selector='")) { + String selector = s.substring(10); + if (selector.startsWith("\"") || selector.startsWith("'")) { + selector = selector.substring(1, selector.length()); + } + if (selector.endsWith("\"") || selector.endsWith("'")) { + selector = selector.substring(0, selector.length() - 1); + } + jmsBinding.setJMSSelector(selector); } else { error(monitor, "UnknownTokenInURI", jmsBinding, s, uri); return; @@ -786,7 +795,7 @@ public class JMSBindingProcessor extends BaseStAXArtifactProcessor implements St private void parseSubscriptionHeaders(XMLStreamReader reader, JMSBinding jmsBinding) throws XMLStreamException { String jmsSelector = reader.getAttributeValue(null, "selector"); - if (jmsSelector != null && jmsSelector.length() > 0) { + if (jmsSelector != null && jmsSelector.length() > 0 && jmsBinding.getJMSSelector() == null) { jmsBinding.setJMSSelector(jmsSelector); } |