From faa627ddc229b62b9c83df321e77e84a5f653548 Mon Sep 17 00:00:00 2001 From: antelder Date: Mon, 14 Sep 2009 12:34:18 +0000 Subject: Update JMS binding model for OASIS changes destination name attribute changed to jndiName, header property JMSTimeToLive changed to timeToLive git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@814612 13f79535-47bb-0310-9956-ffa450edef68 --- .../sca/binding/jms/JMSBindingProcessor.java | 36 +++++++++++----------- .../binding/jms/JMSBindingProcessorTestCase.java | 12 ++++---- .../jms/JMSBindingProcessorWriteTestCase.java | 4 +-- 3 files changed, 26 insertions(+), 26 deletions(-) (limited to 'java/sca') 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 8e1b3fcfda..4f8fbb6348 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 @@ -72,12 +72,12 @@ import org.apache.tuscany.sca.policy.PolicyFactory; * * * * ? * - * + * * * * ? * @@ -90,7 +90,7 @@ import org.apache.tuscany.sca.policy.PolicyFactory; * ? * * - * + * * * * ? * @@ -118,7 +118,7 @@ import org.apache.tuscany.sca.policy.PolicyFactory; * * * * ? @@ -407,7 +407,7 @@ public class JMSBindingProcessor extends BaseStAXArtifactProcessor implements St } private void parseDestination(XMLStreamReader reader, JMSBinding jmsBinding) throws XMLStreamException { - String name = reader.getAttributeValue(null, "name"); + String name = reader.getAttributeValue(null, "jndiName"); if (name != null && name.length() > 0) { jmsBinding.setDestinationName(name); } @@ -453,7 +453,7 @@ public class JMSBindingProcessor extends BaseStAXArtifactProcessor implements St } private void parseResponseDestination(XMLStreamReader reader, JMSBinding jmsBinding) throws XMLStreamException { - String name = reader.getAttributeValue(null, "name"); + String name = reader.getAttributeValue(null, "jndiName"); if (name != null && name.length() > 0) { jmsBinding.setResponseDestinationName(name); } @@ -552,7 +552,7 @@ public class JMSBindingProcessor extends BaseStAXArtifactProcessor implements St * * * * ? @@ -579,7 +579,7 @@ public class JMSBindingProcessor extends BaseStAXArtifactProcessor implements St } } - String jmsTimeToLive = reader.getAttributeValue(null, "JMSTimeToLive"); + String jmsTimeToLive = reader.getAttributeValue(null, "timeToLive"); if (jmsTimeToLive != null && jmsTimeToLive.length() > 0) { jmsBinding.setJMSTimeToLive(Long.parseLong(jmsTimeToLive)); } @@ -649,7 +649,7 @@ public class JMSBindingProcessor extends BaseStAXArtifactProcessor implements St * * * * ? @@ -725,7 +725,7 @@ public class JMSBindingProcessor extends BaseStAXArtifactProcessor implements St } } - String jmsTimeToLive = reader.getAttributeValue(null, "JMSTimeToLive"); + String jmsTimeToLive = reader.getAttributeValue(null, "timeToLive"); if (jmsTimeToLive != null && jmsTimeToLive.length() > 0) { jmsBinding.setOperationJMSTimeToLive(opName, Long.parseLong(jmsTimeToLive)); } @@ -1017,7 +1017,7 @@ public class JMSBindingProcessor extends BaseStAXArtifactProcessor implements St * * * * ? @@ -1046,7 +1046,7 @@ public class JMSBindingProcessor extends BaseStAXArtifactProcessor implements St Long jmsTimeToLive = jmsBinding.getJMSTimeToLive(); if (jmsTimeToLive != null) { - writer.writeAttribute("JMSTimeToLive", jmsTimeToLive.toString()); + writer.writeAttribute("timeToLive", jmsTimeToLive.toString()); } Integer jmsPriority = jmsBinding.getJMSPriority(); @@ -1129,7 +1129,7 @@ public class JMSBindingProcessor extends BaseStAXArtifactProcessor implements St * * * * ? @@ -1193,7 +1193,7 @@ public class JMSBindingProcessor extends BaseStAXArtifactProcessor implements St } if (jmsTimeToLive != null) { - writer.writeAttribute("JMSTimeToLive", jmsTimeToLive.toString()); + writer.writeAttribute("timeToLive", jmsTimeToLive.toString()); } if (jmsPriority != null) { @@ -1273,7 +1273,7 @@ public class JMSBindingProcessor extends BaseStAXArtifactProcessor implements St /** * Writes destination properties if there are any. - * + * * * * ? */ @@ -1289,7 +1289,7 @@ public class JMSBindingProcessor extends BaseStAXArtifactProcessor implements St writer.writeStartElement(Constants.SCA11_NS, "destination"); if ( destinationName != null && destinationName.length() > 0) { - writer.writeAttribute("name", destinationName); + writer.writeAttribute("jndiName", destinationName); } // Type not handled yet @@ -1381,7 +1381,7 @@ public class JMSBindingProcessor extends BaseStAXArtifactProcessor implements St /** * Writes response destination properties if there are any. - * + * * * * ? */ @@ -1397,7 +1397,7 @@ public class JMSBindingProcessor extends BaseStAXArtifactProcessor implements St writer.writeStartElement(Constants.SCA11_NS, "destination"); if ( destinationName != null && destinationName.length() > 0) { - writer.writeAttribute("name", destinationName); + writer.writeAttribute("jndiName", destinationName); } // Type not handled yet 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 0072ac74ce..8a25f99479 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 @@ -70,7 +70,7 @@ public class JMSBindingProcessorTestCase extends TestCase { + " " + " " + " " - + " " + + " " + " " + " " + " " @@ -84,7 +84,7 @@ public class JMSBindingProcessorTestCase extends TestCase { + " " + " " + " " - + " " + + " " + " " + " " + " " @@ -180,7 +180,7 @@ public class JMSBindingProcessorTestCase extends TestCase { + " " + " " + " " - + " " + + " " + " " + " " + " " @@ -194,7 +194,7 @@ public class JMSBindingProcessorTestCase extends TestCase { + " " + " " + " " - + " " + + " " + " " + " some value text" + " " @@ -255,7 +255,7 @@ public class JMSBindingProcessorTestCase extends TestCase { + " " + " " + " " - + " " + + " " + " " + " some value text" + " " @@ -376,7 +376,7 @@ public class JMSBindingProcessorTestCase extends TestCase { + " " + " " + " " - + " " + + " " + " " + " " + " " diff --git a/java/sca/modules/binding-jms/src/test/java/org/apache/tuscany/sca/binding/jms/JMSBindingProcessorWriteTestCase.java b/java/sca/modules/binding-jms/src/test/java/org/apache/tuscany/sca/binding/jms/JMSBindingProcessorWriteTestCase.java index 606af183a7..f033887e5d 100644 --- a/java/sca/modules/binding-jms/src/test/java/org/apache/tuscany/sca/binding/jms/JMSBindingProcessorWriteTestCase.java +++ b/java/sca/modules/binding-jms/src/test/java/org/apache/tuscany/sca/binding/jms/JMSBindingProcessorWriteTestCase.java @@ -57,7 +57,7 @@ public class JMSBindingProcessorWriteTestCase extends TestCase { + " " + " " + " " - + " " + + " " + " " + " " + " " @@ -405,7 +405,7 @@ public class JMSBindingProcessorWriteTestCase extends TestCase { "" + "" + " " + - "" + + "" + "" + " " + " "+ -- cgit v1.2.3