summaryrefslogtreecommitdiffstats
path: root/java/sca/modules/binding-jms
diff options
context:
space:
mode:
authorantelder <antelder@13f79535-47bb-0310-9956-ffa450edef68>2008-08-29 06:45:24 +0000
committerantelder <antelder@13f79535-47bb-0310-9956-ffa450edef68>2008-08-29 06:45:24 +0000
commit8d5c5870cc4754f73652177bc48b880463e3b5a4 (patch)
treef02b50910c3fba1b29ff01fedd80fd009e95e8d8 /java/sca/modules/binding-jms
parent9d627fbdaa4ae300843644dfbae874457b3731e2 (diff)
Complete jms binding attributes that can be defined in the definitions.xml file
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@690125 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'java/sca/modules/binding-jms')
-rw-r--r--java/sca/modules/binding-jms/src/main/java/org/apache/tuscany/sca/binding/jms/impl/JMSBinding.java66
-rw-r--r--java/sca/modules/binding-jms/src/main/java/org/apache/tuscany/sca/binding/jms/impl/JMSBindingProcessor.java5
2 files changed, 53 insertions, 18 deletions
diff --git a/java/sca/modules/binding-jms/src/main/java/org/apache/tuscany/sca/binding/jms/impl/JMSBinding.java b/java/sca/modules/binding-jms/src/main/java/org/apache/tuscany/sca/binding/jms/impl/JMSBinding.java
index 6fdffaf4d4..bd493bb658 100644
--- a/java/sca/modules/binding-jms/src/main/java/org/apache/tuscany/sca/binding/jms/impl/JMSBinding.java
+++ b/java/sca/modules/binding-jms/src/main/java/org/apache/tuscany/sca/binding/jms/impl/JMSBinding.java
@@ -39,8 +39,7 @@ public class JMSBinding implements Binding {
return super.clone();
}
- // properties required to implement the Tuscany
- // binding extension SPI
+ // properties required to implement the Tuscany binding extension SPI
private String uri = null;
private String name = null;
private boolean unresolved = false;
@@ -72,8 +71,7 @@ public class JMSBinding implements Binding {
private String responseConnectionFactoryName = JMSBindingConstants.DEFAULT_CONNECTION_FACTORY_NAME;
private String responseConnectionFactoryCreate = JMSBindingConstants.CREATE_IF_NOT_EXIST;
- // Provides the name of the factory that interfaces to the
- // JMS API for us.
+ // Provides the name of the factory that interfaces to the JMS API for us.
private String jmsResourceFactoryName = JMSBindingConstants.DEFAULT_RF_CLASSNAME;
// Message processors used to deal with the request and response messages
@@ -199,7 +197,11 @@ public class JMSBinding implements Binding {
}
public String getDestinationType() {
- return destinationType;
+ if (requestConnectionBinding != null && requestConnectionBinding.getDestinationType() != null) {
+ return requestConnectionBinding.getDestinationType();
+ } else {
+ return destinationType;
+ }
}
public void setDestinationType(String destinationType) {
@@ -207,7 +209,11 @@ public class JMSBinding implements Binding {
}
public String getDestinationCreate() {
- return this.destinationCreate;
+ if (requestConnectionBinding != null && requestConnectionBinding.getDestinationCreate() != null) {
+ return requestConnectionBinding.getDestinationCreate();
+ } else {
+ return this.destinationCreate;
+ }
}
public void setDestinationCreate(String create) {
@@ -227,7 +233,11 @@ public class JMSBinding implements Binding {
}
public String getConnectionFactoryCreate() {
- return this.connectionFactoryCreate;
+ if (requestConnectionBinding != null && requestConnectionBinding.getConnectionFactoryCreate() != null) {
+ return requestConnectionBinding.getConnectionFactoryCreate();
+ } else {
+ return this.connectionFactoryCreate;
+ }
}
public void setConnectionFactoryCreate(String create) {
@@ -235,7 +245,11 @@ public class JMSBinding implements Binding {
}
public String getActivationSpecName() {
- return activationSpecName;
+ if (requestConnectionBinding != null && requestConnectionBinding.getActivationSpecName() != null) {
+ return requestConnectionBinding.getActivationSpecName();
+ } else {
+ return activationSpecName;
+ }
}
public void setActivationSpecName(String activationSpecName) {
@@ -243,7 +257,11 @@ public class JMSBinding implements Binding {
}
public String getActivationSpecCreate() {
- return this.activationSpecCreate;
+ if (requestConnectionBinding != null && requestConnectionBinding.getActivationSpecCreate() != null) {
+ return requestConnectionBinding.getActivationSpecCreate();
+ } else {
+ return this.activationSpecCreate;
+ }
}
public void setActivationSpecCreate(String create) {
@@ -263,7 +281,11 @@ public class JMSBinding implements Binding {
}
public String getResponseDestinationType() {
- return this.responseDestinationType;
+ if (requestConnectionBinding != null && requestConnectionBinding.getResponseDestinationType() != null) {
+ return requestConnectionBinding.getResponseDestinationType();
+ } else {
+ return this.responseDestinationType;
+ }
}
public void setResponseDestinationType(String type) {
@@ -271,7 +293,11 @@ public class JMSBinding implements Binding {
}
public String getResponseDestinationCreate() {
- return this.responseDestinationCreate;
+ if (requestConnectionBinding != null && requestConnectionBinding.getResponseDestinationCreate() != null) {
+ return requestConnectionBinding.getResponseDestinationCreate();
+ } else {
+ return this.responseDestinationCreate;
+ }
}
public void setResponseDestinationCreate(String create) {
@@ -291,7 +317,11 @@ public class JMSBinding implements Binding {
}
public String getResponseConnectionFactoryCreate() {
- return this.responseConnectionFactoryCreate;
+ if (requestConnectionBinding != null && requestConnectionBinding.getResponseConnectionFactoryCreate() != null) {
+ return requestConnectionBinding.getResponseConnectionFactoryCreate();
+ } else {
+ return this.responseConnectionFactoryCreate;
+ }
}
public void setResponseConnectionFactoryCreate(String create) {
@@ -299,7 +329,11 @@ public class JMSBinding implements Binding {
}
public String getResponseActivationSpecName() {
- return responseActivationSpecName;
+ if (requestConnectionBinding != null && requestConnectionBinding.getResponseActivationSpecName() != null) {
+ return requestConnectionBinding.getResponseActivationSpecName();
+ } else {
+ return responseActivationSpecName;
+ }
}
public void setResponseActivationSpecName(String activationSpecName) {
@@ -307,7 +341,11 @@ public class JMSBinding implements Binding {
}
public String getResponseActivationSpecCreate() {
- return this.responseActivationSpecCreate;
+ if (requestConnectionBinding != null && requestConnectionBinding.getResponseActivationSpecCreate() != null) {
+ return requestConnectionBinding.getResponseActivationSpecCreate();
+ } else {
+ return this.responseActivationSpecCreate;
+ }
}
public void setResponseActivationSpecCreate(String create) {
diff --git a/java/sca/modules/binding-jms/src/main/java/org/apache/tuscany/sca/binding/jms/impl/JMSBindingProcessor.java b/java/sca/modules/binding-jms/src/main/java/org/apache/tuscany/sca/binding/jms/impl/JMSBindingProcessor.java
index 6913be730b..2fa7ea057b 100644
--- a/java/sca/modules/binding-jms/src/main/java/org/apache/tuscany/sca/binding/jms/impl/JMSBindingProcessor.java
+++ b/java/sca/modules/binding-jms/src/main/java/org/apache/tuscany/sca/binding/jms/impl/JMSBindingProcessor.java
@@ -187,7 +187,6 @@ public class JMSBindingProcessor implements StAXArtifactProcessor<JMSBinding> {
jmsBinding.setCorrelationScheme(correlationScheme);
} else {
error("InvalidCorrelationScheme", reader, correlationScheme);
- //throw new JMSBindingException("invalid correlationScheme: " + correlationScheme);
}
}
@@ -301,6 +300,7 @@ public class JMSBindingProcessor implements StAXArtifactProcessor<JMSBinding> {
}
}
+ @SuppressWarnings("unchecked")
private JMSBinding getConnectionBinding(String bindingName, ModelResolver resolver) {
if (resolver instanceof ExtensibleModelResolver) {
DefaultModelResolver dr = (DefaultModelResolver)((ExtensibleModelResolver) resolver).getDefaultModelResolver();
@@ -432,12 +432,9 @@ public class JMSBindingProcessor implements StAXArtifactProcessor<JMSBinding> {
case END_ELEMENT:
QName x = reader.getName();
if (x.getLocalPart().equals("response")) {
-// reader.next();
return;
} else {
error("UnexpectedResponseElement", reader, x.toString());
- //throw new RuntimeException("Incomplete binding.jms/response definition found unexpected element "
- //+ x.toString());
}
}
}