tuscany-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From antel...@apache.org
Subject svn commit: r608220 - /incubator/tuscany/java/sca/modules/binding-jms/src/main/java/org/apache/tuscany/sca/binding/jms/provider/JMSBindingReferenceBindingProvider.java
Date Wed, 02 Jan 2008 20:50:14 GMT
Author: antelder
Date: Wed Jan  2 12:50:13 2008
New Revision: 608220

URL: http://svn.apache.org/viewvc?rev=608220&view=rev
Log:
Fix formatting of commentted out code

Modified:
    incubator/tuscany/java/sca/modules/binding-jms/src/main/java/org/apache/tuscany/sca/binding/jms/provider/JMSBindingReferenceBindingProvider.java

Modified: incubator/tuscany/java/sca/modules/binding-jms/src/main/java/org/apache/tuscany/sca/binding/jms/provider/JMSBindingReferenceBindingProvider.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/binding-jms/src/main/java/org/apache/tuscany/sca/binding/jms/provider/JMSBindingReferenceBindingProvider.java?rev=608220&r1=608219&r2=608220&view=diff
==============================================================================
--- incubator/tuscany/java/sca/modules/binding-jms/src/main/java/org/apache/tuscany/sca/binding/jms/provider/JMSBindingReferenceBindingProvider.java
(original)
+++ incubator/tuscany/java/sca/modules/binding-jms/src/main/java/org/apache/tuscany/sca/binding/jms/provider/JMSBindingReferenceBindingProvider.java
Wed Jan  2 12:50:13 2008
@@ -79,20 +79,40 @@
         if (jmsBinding.getResponseDestinationName().equals(JMSBindingConstants.DEFAULT_RESPONSE_DESTINATION_NAME))
{
             throw new JMSBindingException("No response destination specified for reference
" + reference.getName());
         }
-        /*
-         * The following doesn't work as I can't get to the target list on the composite
reference // if the default
-         * destination queue name is set // set the destination queue name to the wired service
name // so that any
-         * wires can be assured a unique endpoint. if
-         * (jmsBinding.getDestinationName().equals(JMSBindingConstants.DEFAULT_DESTINATION_NAME)){
// get the name of
-         * the target service List<ComponentService> targets = reference.getTargets();
if (targets.size() < 1){ throw
-         * new JMSBindingException("No target specified for reference " + reference.getName()
+ " so destination queue
-         * name can't be determined"); } if (targets.size() > 1){ throw new JMSBindingException("More
than one target
-         * specified for reference " + reference.getName() + " so destination queue name
can't be determined"); }
-         * ComponentService service = targets.get(0); jmsBinding.setDestinationName(service.getName());
} // if the
-         * default response queue name is set // set the response queue to the names of this
// reference if
-         * (jmsBinding.getResponseDestinationName().equals(JMSBindingConstants.DEFAULT_RESPONSE_DESTINATION_NAME)){
-         * jmsBinding.setResponseDestinationName(reference.getName()); }
-         */
+        /* The following doesn't work as I can't get to the 
+         * target list on the composite reference
+                // if the default destination queue name is set
+                // set the destination queue name to the wired service name
+                // so that any wires can be assured a unique endpoint.
+                
+                if (jmsBinding.getDestinationName().equals(JMSBindingConstants.DEFAULT_DESTINATION_NAME)){
+                    // get the name of the target service
+                    List<ComponentService> targets = reference.getTargets();
+                    
+                    if (targets.size() < 1){
+                        throw new JMSBindingException("No target specified for reference
" +
+                                                      reference.getName() +
+                                                      " so destination queue name can't be
determined");
+                    }
+                    
+                    if (targets.size() > 1){
+                        throw new JMSBindingException("More than one target specified for
reference " +
+                                                      reference.getName() +
+                                                      " so destination queue name can't be
determined");
+                    }
+                    
+                    ComponentService service = targets.get(0);
+                    jmsBinding.setDestinationName(service.getName());
+                }
+                
+                
+                // if the default response queue name is set 
+                // set the response queue to the names of this 
+                // reference
+                if (jmsBinding.getResponseDestinationName().equals(JMSBindingConstants.DEFAULT_RESPONSE_DESTINATION_NAME)){
+                    jmsBinding.setResponseDestinationName(reference.getName());
+                }    
+        */        
         JMSBindingInvoker invoker = new JMSBindingInvoker(jmsBinding, operation);
         jmsBindingInvokers.add(invoker);
         return invoker;



---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-commits-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-commits-help@ws.apache.org


Mime
View raw message