summaryrefslogtreecommitdiffstats
path: root/sca-java-2.x/trunk
diff options
context:
space:
mode:
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;
}