Return-Path: X-Original-To: apmail-tuscany-commits-archive@www.apache.org Delivered-To: apmail-tuscany-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 7B8B49799 for ; Tue, 20 Dec 2011 14:22:44 +0000 (UTC) Received: (qmail 54229 invoked by uid 500); 20 Dec 2011 14:22:44 -0000 Delivered-To: apmail-tuscany-commits-archive@tuscany.apache.org Received: (qmail 54194 invoked by uid 500); 20 Dec 2011 14:22:44 -0000 Mailing-List: contact commits-help@tuscany.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@tuscany.apache.org Delivered-To: mailing list commits@tuscany.apache.org Received: (qmail 54187 invoked by uid 99); 20 Dec 2011 14:22:44 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 20 Dec 2011 14:22:44 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 20 Dec 2011 14:22:41 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id C209D2388980 for ; Tue, 20 Dec 2011 14:22:19 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1221271 - /tuscany/sca-java-2.x/trunk/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/provider/JMSBindingServiceBindingProvider.java Date: Tue, 20 Dec 2011 14:22:19 -0000 To: commits@tuscany.apache.org From: antelder@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20111220142219.C209D2388980@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: antelder Date: Tue Dec 20 14:22:19 2011 New Revision: 1221271 URL: http://svn.apache.org/viewvc?rev=1221271&view=rev Log: MOve the initilization of a default destination name to a seperate method so it can be overriden by subclasses Modified: tuscany/sca-java-2.x/trunk/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/provider/JMSBindingServiceBindingProvider.java Modified: tuscany/sca-java-2.x/trunk/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/provider/JMSBindingServiceBindingProvider.java URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/provider/JMSBindingServiceBindingProvider.java?rev=1221271&r1=1221270&r2=1221271&view=diff ============================================================================== --- tuscany/sca-java-2.x/trunk/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/provider/JMSBindingServiceBindingProvider.java (original) +++ tuscany/sca-java-2.x/trunk/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/provider/JMSBindingServiceBindingProvider.java Tue Dec 20 14:22:19 2011 @@ -98,16 +98,7 @@ public class JMSBindingServiceBindingPro 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 JMSBindingServiceBindingPro } } + 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; }