summaryrefslogtreecommitdiffstats
path: root/java/sca
diff options
context:
space:
mode:
Diffstat (limited to 'java/sca')
-rw-r--r--java/sca/modules/binding-jms/src/main/java/org/apache/tuscany/sca/binding/jms/JMSBindingProcessor.java36
-rw-r--r--java/sca/modules/binding-jms/src/test/java/org/apache/tuscany/sca/binding/jms/JMSBindingProcessorTestCase.java12
-rw-r--r--java/sca/modules/binding-jms/src/test/java/org/apache/tuscany/sca/binding/jms/JMSBindingProcessorWriteTestCase.java4
3 files changed, 26 insertions, 26 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 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;
* <headers JMSType="string"?
* JMSCorrelationID="string"?
* JMSDeliveryMode="string"?
- * JMSTimeToLive="int"?
+ * timeToLive="int"?
* JMSPriority="string"?>
* <property name="NMTOKEN" type="NMTOKEN">*
* </headers>?
*
- * <destination name="xs:anyURI" type="string"? create="string"?>
+ * <destination jndiName="xs:anyURI" type="string"? create="string"?>
* <property name="NMTOKEN" type="NMTOKEN">*
* </destination>?
*
@@ -90,7 +90,7 @@ import org.apache.tuscany.sca.policy.PolicyFactory;
* </activationSpec>?
*
* <response>
- * <destination name="xs:anyURI" type="string"? create="string"?>
+ * <destination jndiName="xs:anyURI" type="string"? create="string"?>
* <property name="NMTOKEN" type="NMTOKEN">*
* </destination>?
*
@@ -118,7 +118,7 @@ import org.apache.tuscany.sca.policy.PolicyFactory;
* <headers JMSType="string"?
* JMSCorrelationID="string"?
* JMSDeliveryMode="string"?
- * JMSTimeToLive="int"?
+ * timeToLive="int"?
* JMSPriority="string"?>
* <property name="NMTOKEN" type="NMTOKEN">*
* </headers>?
@@ -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
* <headers JMSType=”string”?
* JMSCorrelationID=”string”?
* JMSDeliveryMode=”PERSISTENT or NON_PERSISTENT”?
- * JMSTimeToLive=”long”?
+ * timeToLive=”long”?
* JMSPriority=”0 .. 9”?>
* <property name=”NMTOKEN” type=”NMTOKEN”?>*
* </headers>?
@@ -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
* <headers JMSType=”string”?
* JMSCorrelationID=”string”?
* JMSDeliveryMode=”PERSISTENT or NON_PERSISTENT”?
- * JMSTimeToLive=”long”?
+ * timeToLive=”long”?
* JMSPriority=”0 .. 9”?>
* <property name=”NMTOKEN” type=”NMTOKEN”?>*
* </headers>?
@@ -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
* <headers JMSType=”string”?
* JMSCorrelationID=”string”?
* JMSDeliveryMode=”PERSISTENT or NON_PERSISTENT”?
- * JMSTimeToLive=”long”?
+ * timeToLive=”long”?
* JMSPriority=”0 .. 9”?>
* <property name=”NMTOKEN” type=”NMTOKEN”?>*
* </headers>?
@@ -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
* <headers JMSType="string"?
* JMSCorrelationID="string"?
* JMSDeliveryMode="string"?
- * JMSTimeToLive="int"?
+ * timeToLive="int"?
* JMSPriority="string"?>
* <property name="NMTOKEN" type="NMTOKEN">*
* </headers>?
@@ -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.
- * <destination name="xs:anyURI" type="string"? create="string"?>
+ * <destination jndiName="xs:anyURI" type="string"? create="string"?>
* <property name="NMTOKEN" type="NMTOKEN">*
* </destination>?
*/
@@ -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.
- * <destination name="xs:anyURI" type="string"? create="string"?>
+ * <destination jndiName="xs:anyURI" type="string"? create="string"?>
* <property name="NMTOKEN" type="NMTOKEN">*
* </destination>?
*/
@@ -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 {
+ " <implementation.java class=\"services.HelloWorld\"/>"
+ " <service name=\"HelloWorldService\">"
+ " <binding.jms uri=\"jms:testQueue\" >"
- + " <headers JMSType=\"myType\" JMSCorrelationID=\"myCorrelId\" JMSDeliveryMode=\"PERSISTENT\" JMSTimeToLive=\"54321\" JMSPriority=\"5\">"
+ + " <headers JMSType=\"myType\" JMSCorrelationID=\"myCorrelId\" JMSDeliveryMode=\"PERSISTENT\" timeToLive=\"54321\" JMSPriority=\"5\">"
+ " </headers>"
+ " </binding.jms>"
+ " </service>"
@@ -84,7 +84,7 @@ public class JMSBindingProcessorTestCase extends TestCase {
+ " <implementation.java class=\"services.HelloWorld\"/>"
+ " <service name=\"HelloWorldService\">"
+ " <binding.jms uri=\"jms:testQueue\" >"
- + " <headers JMSType=\"myType\" JMSCorrelationID=\"myCorrelId\" JMSDeliveryMode=\"PERSISTENT\" JMSTimeToLive=\"54321\" JMSPriority=\"medium\">"
+ + " <headers JMSType=\"myType\" JMSCorrelationID=\"myCorrelId\" JMSDeliveryMode=\"PERSISTENT\" timeToLive=\"54321\" JMSPriority=\"medium\">"
+ " </headers>"
+ " </binding.jms>"
+ " </service>"
@@ -180,7 +180,7 @@ public class JMSBindingProcessorTestCase extends TestCase {
+ " <service name=\"HelloWorldService\">"
+ " <binding.jms uri=\"jms:testQueue\" responseConnection=\"responseConnectionAttrName\">"
+ " <response>"
- + " <destination name=\"responseConnectionElementName\"/>"
+ + " <destination jndiName=\"responseConnectionElementName\"/>"
+ " </response>"
+ " </binding.jms>"
+ " </service>"
@@ -194,7 +194,7 @@ public class JMSBindingProcessorTestCase extends TestCase {
+ " <implementation.java class=\"services.HelloWorld\"/>"
+ " <service name=\"HelloWorldService\">"
+ " <binding.jms>"
- + " <destination name=\"foo\">"
+ + " <destination jndiName=\"foo\">"
+ " <property name=\"xxx\" type=\"yyy\">"
+ " some value text"
+ " </property>"
@@ -255,7 +255,7 @@ public class JMSBindingProcessorTestCase extends TestCase {
+ " <service name=\"HelloWorldService\">"
+ " <binding.jms>"
+ " <response>"
- + " <destination name=\"foo\">"
+ + " <destination jndiName=\"foo\">"
+ " <property name=\"xxx\" type=\"yyy\">"
+ " some value text"
+ " </property>"
@@ -376,7 +376,7 @@ public class JMSBindingProcessorTestCase extends TestCase {
+ " <service name=\"HelloWorldService\">"
+ " <binding.jms uri=\"jms:testQueue\" >"
+ " <response>"
- + " <destination name=\"responseConnectionElementName\"/>"
+ + " <destination jndiName=\"responseConnectionElementName\"/>"
+ " <tuscany:wireFormat.jmsBytes/>"
+ " </response>"
+ " <tuscany:wireFormat.jmsObject/>"
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 {
+ " <component name=\"HelloWorldComponent\">"
+ " <service name=\"HelloWorldService\">"
+ " <binding.jms>"
- + " <destination name=\"AAA\">"
+ + " <destination jndiName=\"AAA\">"
+ " <property name=\"AAAProp\" type=\"string\"/>"
+ " </destination>"
+ " <connectionFactory name=\"ABC\"/>"
@@ -405,7 +405,7 @@ public class JMSBindingProcessorWriteTestCase extends TestCase {
"<component name=\"HelloWorldComponent\">" +
"<service name=\"HelloWorldService\">" +
"<binding.jms><operationProperties name=\"JKL\" /> " +
- "<destination name=\"AAA\">" +
+ "<destination jndiName=\"AAA\">" +
"<property name=\"AAAProp\" type=\"string\"></property>" +
"</destination> " +
"<connectionFactory name=\"ABC\" /> "+