tuscany-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From antel...@apache.org
Subject svn commit: r984801 - in /tuscany/sca-java-2.x/trunk/modules/binding-jms/src/main: java/org/apache/tuscany/sca/binding/jms/JMSBindingProcessor.java resources/binding-jms-validation-messages.properties
Date Thu, 12 Aug 2010 14:27:37 GMT
Author: antelder
Date: Thu Aug 12 14:27:37 2010
New Revision: 984801

URL: http://svn.apache.org/viewvc?rev=984801&view=rev
Log:
Check that a destination is defined when connectionFactory element is used

Modified:
    tuscany/sca-java-2.x/trunk/modules/binding-jms/src/main/java/org/apache/tuscany/sca/binding/jms/JMSBindingProcessor.java
    tuscany/sca-java-2.x/trunk/modules/binding-jms/src/main/resources/binding-jms-validation-messages.properties

Modified: tuscany/sca-java-2.x/trunk/modules/binding-jms/src/main/java/org/apache/tuscany/sca/binding/jms/JMSBindingProcessor.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/modules/binding-jms/src/main/java/org/apache/tuscany/sca/binding/jms/JMSBindingProcessor.java?rev=984801&r1=984800&r2=984801&view=diff
==============================================================================
--- tuscany/sca-java-2.x/trunk/modules/binding-jms/src/main/java/org/apache/tuscany/sca/binding/jms/JMSBindingProcessor.java
(original)
+++ tuscany/sca-java-2.x/trunk/modules/binding-jms/src/main/java/org/apache/tuscany/sca/binding/jms/JMSBindingProcessor.java
Thu Aug 12 14:27:37 2010
@@ -883,6 +883,14 @@ public class JMSBindingProcessor extends
             }
         }
 
+        // If Connection factory specified then destination name must also be
+        if (( connectionFactoryName != null ) && ( connectionFactoryName.length()
> 0 )) {
+            String destinationName = jmsBinding.getDestinationName();
+            if ((destinationName == null) || (destinationName.length() < 1 )) {
+                error(monitor, "ConnectionFactoryDestinationContradiction", jmsBinding, connectionFactoryName);
               
+            }
+        }
+
         // Given a response connection name attribute, there must not be a response element.
         // 156  /binding.jms/@responseConnection - identifies a binding.jms element that
is present in a
         // 157 definition document, whose response child element is used to define the values
for this binding. In

Modified: tuscany/sca-java-2.x/trunk/modules/binding-jms/src/main/resources/binding-jms-validation-messages.properties
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/modules/binding-jms/src/main/resources/binding-jms-validation-messages.properties?rev=984801&r1=984800&r2=984801&view=diff
==============================================================================
--- tuscany/sca-java-2.x/trunk/modules/binding-jms/src/main/resources/binding-jms-validation-messages.properties
(original)
+++ tuscany/sca-java-2.x/trunk/modules/binding-jms/src/main/resources/binding-jms-validation-messages.properties
Thu Aug 12 14:27:37 2010
@@ -45,6 +45,7 @@ InvalidOPJMSPriority = Invalid OPJMSPrio
 DestinationQueueContradiction = Destination type queue contradicts connection factory name:
{0}
 DestinationTopicContradiction = Destination type topic contradicts connection factory name:
{0}
 ConnectionFactoryActivationSpecContradiction = Connection factory \"{0}\" and activation
specification \"{0}\" are mutually exclusive                
+ConnectionFactoryDestinationContradiction = When connection factory \"{0}\" element is present
then a destination name must also be defined                
 ResponseAttrElement = Response connection \"{0}\" and response element \"{1}\" are mutually
exclusive                               
 BindingNotFound = {0} refers to a binding definition {1} which is not found
 DuplicateOperationProperties = Must not use both operationProperties attribute and operationProperties
element



Mime
View raw message