summaryrefslogtreecommitdiffstats
path: root/sca-java-2.x/trunk
diff options
context:
space:
mode:
authorantelder <antelder@13f79535-47bb-0310-9956-ffa450edef68>2011-12-20 14:22:19 +0000
committerantelder <antelder@13f79535-47bb-0310-9956-ffa450edef68>2011-12-20 14:22:19 +0000
commit921cdaca701db41f910a775e146443de37dbb215 (patch)
tree20ceb49d13fd64223953000a667375a62fbdafa4 /sca-java-2.x/trunk
parent38eceb6155b02a96df67a962408a357a2bdfa0de (diff)
MOve the initilization of a default destination name to a seperate method so it can be overriden by subclasses
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1221271 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-java-2.x/trunk')
-rw-r--r--sca-java-2.x/trunk/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/provider/JMSBindingServiceBindingProvider.java24
1 files changed, 14 insertions, 10 deletions
diff --git a/sca-java-2.x/trunk/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/provider/JMSBindingServiceBindingProvider.java b/sca-java-2.x/trunk/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/provider/JMSBindingServiceBindingProvider.java
index 61651c176a..ed6c44003b 100644
--- a/sca-java-2.x/trunk/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/provider/JMSBindingServiceBindingProvider.java
+++ b/sca-java-2.x/trunk/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/provider/JMSBindingServiceBindingProvider.java
@@ -98,16 +98,7 @@ public class JMSBindingServiceBindingProvider implements EndpointAsyncProvider,
throw new JMSBindingException("[BJM30023] response/activationSpec element MUST NOT be present when the binding is being used for an SCA service");
}
- // Set the default destination when using a connection factory.
- // If an activation spec is being used, do not set the destination
- // because the activation spec provides the destination.
- if (jmsBinding.getDestinationName() == null &&
- (jmsBinding.getActivationSpecName() == null || jmsBinding.getActivationSpecName().equals(""))) {
-// if (!service.isCallback()) { // TODO: 2.x migration, is this check needed?
- // use the SCA service name as the default destination name
- jmsBinding.setDestinationName(service.getName());
-// }
- }
+ initBindingName();
// Get Message factory
modelFactories = extensionPoints.getExtensionPoint(FactoryExtensionPoint.class);
@@ -146,6 +137,19 @@ public class JMSBindingServiceBindingProvider implements EndpointAsyncProvider,
}
}
+ protected void initBindingName() {
+ // Set the default destination when using a connection factory.
+ // If an activation spec is being used, do not set the destination
+ // because the activation spec provides the destination.
+ if (jmsBinding.getDestinationName() == null &&
+ (jmsBinding.getActivationSpecName() == null || jmsBinding.getActivationSpecName().equals(""))) {
+// if (!service.isCallback()) { // TODO: 2.x migration, is this check needed?
+ // use the SCA service name as the default destination name
+ jmsBinding.setDestinationName(service.getName());
+// }
+ }
+ }
+
public InterfaceContract getBindingInterfaceContract() {
return interfaceContract;
}