summaryrefslogtreecommitdiffstats
path: root/java
diff options
context:
space:
mode:
authorantelder <antelder@13f79535-47bb-0310-9956-ffa450edef68>2009-10-06 12:30:32 +0000
committerantelder <antelder@13f79535-47bb-0310-9956-ffa450edef68>2009-10-06 12:30:32 +0000
commit9d84f1070f3cab624330216e50a1b3272b49c196 (patch)
tree9f55387cedd566817e099d518cebfb39912c9787 /java
parent3cba7e922ba7c669e5db55e8c8bd4bfa01a3eed8 (diff)
Updates for OASIS selectors
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@822245 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'java')
-rw-r--r--java/sca/modules/binding-jms/src/main/java/org/apache/tuscany/sca/binding/jms/JMSBindingProcessor.java14
-rw-r--r--java/sca/modules/binding-jms/src/test/java/org/apache/tuscany/sca/binding/jms/JMSBindingProcessorTestCase.java2
2 files changed, 8 insertions, 8 deletions
diff --git a/java/sca/modules/binding-jms/src/main/java/org/apache/tuscany/sca/binding/jms/JMSBindingProcessor.java b/java/sca/modules/binding-jms/src/main/java/org/apache/tuscany/sca/binding/jms/JMSBindingProcessor.java
index 89329a626f..ef21b6d4c3 100644
--- a/java/sca/modules/binding-jms/src/main/java/org/apache/tuscany/sca/binding/jms/JMSBindingProcessor.java
+++ b/java/sca/modules/binding-jms/src/main/java/org/apache/tuscany/sca/binding/jms/JMSBindingProcessor.java
@@ -290,7 +290,7 @@ public class JMSBindingProcessor extends BaseStAXArtifactProcessor implements St
parseHeaders(reader, jmsBinding);
} else if ("operationProperties".equals(elementName)) {
parseOperationProperties(reader, jmsBinding);
- } else if ("SubscriptionHeaders".equals(elementName)) {
+ } else if ("messageSelection".equals(elementName)) {
parseSubscriptionHeaders(reader, jmsBinding);
} else if (Constants.OPERATION_QNAME.equals(reader.getName())) {
ConfiguredOperation confOp = configuredOperationProcessor.read(reader);
@@ -777,14 +777,14 @@ public class JMSBindingProcessor extends BaseStAXArtifactProcessor implements St
}
private void parseSubscriptionHeaders(XMLStreamReader reader, JMSBinding jmsBinding) throws XMLStreamException {
- String jmsSelector = reader.getAttributeValue(null, "JMSSelector");
+ String jmsSelector = reader.getAttributeValue(null, "selector");
if (jmsSelector != null && jmsSelector.length() > 0) {
jmsBinding.setJMSSelector(jmsSelector);
}
// Skip to end element
while (reader.hasNext()) {
- if (reader.next() == END_ELEMENT && "SubscriptionHeaders".equals(reader.getName().getLocalPart())) {
+ if (reader.next() == END_ELEMENT && "messageSelection".equals(reader.getName().getLocalPart())) {
break;
}
} // end while
@@ -1234,16 +1234,16 @@ public class JMSBindingProcessor extends BaseStAXArtifactProcessor implements St
/**
* Writes subscription headers if there are any.
- * <complexType name="SubscriptionHeaders">
- * <attribute name="JMSSelector" type="string"/>
+ * <complexType name="messageSelection">
+ * <attribute name="selector" type="string"/>
* </complexType>
*
*/
private void writeSubscriptionHeaders( JMSBinding jmsBinding, XMLStreamWriter writer) throws XMLStreamException {
String jmsSubscriptionHeaders = jmsBinding.getJMSSelector();
if (jmsSubscriptionHeaders != null && jmsSubscriptionHeaders.length() > 0) {
- writer.writeStartElement(Constants.SCA11_NS, "SubscriptionHeaders");
- writer.writeAttribute("JMSSelector", jmsSubscriptionHeaders);
+ writer.writeStartElement(Constants.SCA11_NS, "messageSelection");
+ writer.writeAttribute("selector", jmsSubscriptionHeaders);
writer.writeEndElement();
// Strange bug. Without white space, headers end tag improperly read.
// writer.writeCharacters( " " );
diff --git a/java/sca/modules/binding-jms/src/test/java/org/apache/tuscany/sca/binding/jms/JMSBindingProcessorTestCase.java b/java/sca/modules/binding-jms/src/test/java/org/apache/tuscany/sca/binding/jms/JMSBindingProcessorTestCase.java
index 136b41cc1f..202277a2c2 100644
--- a/java/sca/modules/binding-jms/src/test/java/org/apache/tuscany/sca/binding/jms/JMSBindingProcessorTestCase.java
+++ b/java/sca/modules/binding-jms/src/test/java/org/apache/tuscany/sca/binding/jms/JMSBindingProcessorTestCase.java
@@ -154,7 +154,7 @@ public class JMSBindingProcessorTestCase extends TestCase {
+ " <implementation.java class=\"services.HelloWorld\"/>"
+ " <service name=\"HelloWorldService\">"
+ " <binding.jms uri=\"jms:testQueue\" >"
- + " <SubscriptionHeaders JMSSelector=\"prop1 = 2\" />"
+ + " <messageSelection selector=\"prop1 = 2\" />"
+ " </binding.jms>"
+ " </service>"
+ " </component>"