From 921cdaca701db41f910a775e146443de37dbb215 Mon Sep 17 00:00:00 2001 From: antelder Date: Tue, 20 Dec 2011 14:22:19 +0000 Subject: 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 --- .../provider/JMSBindingServiceBindingProvider.java | 24 +++++++++++++--------- 1 file changed, 14 insertions(+), 10 deletions(-) (limited to 'sca-java-2.x/trunk/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca') 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; } -- cgit v1.2.3