diff options
author | bdaniel <bdaniel@13f79535-47bb-0310-9956-ffa450edef68> | 2010-08-27 18:01:00 +0000 |
---|---|---|
committer | bdaniel <bdaniel@13f79535-47bb-0310-9956-ffa450edef68> | 2010-08-27 18:01:00 +0000 |
commit | b8d03880cc4c031f0c5b89bab6af92c9e261516f (patch) | |
tree | a7fd0b735c764c80b13685d5c958b4bf482609ed /sca-java-2.x/trunk/modules/binding-jms/src/main/java | |
parent | 6739a259b245dfd7953efe3ff2b6a55570be55e5 (diff) |
BJM_3019 Add validation to make sure the jms binding destination name matches the activation spec name
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@990217 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-java-2.x/trunk/modules/binding-jms/src/main/java')
-rw-r--r-- | sca-java-2.x/trunk/modules/binding-jms/src/main/java/org/apache/tuscany/sca/binding/jms/JMSBindingProcessor.java | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/sca-java-2.x/trunk/modules/binding-jms/src/main/java/org/apache/tuscany/sca/binding/jms/JMSBindingProcessor.java b/sca-java-2.x/trunk/modules/binding-jms/src/main/java/org/apache/tuscany/sca/binding/jms/JMSBindingProcessor.java index 8ddcd6a099..dfb3dd9412 100644 --- a/sca-java-2.x/trunk/modules/binding-jms/src/main/java/org/apache/tuscany/sca/binding/jms/JMSBindingProcessor.java +++ b/sca-java-2.x/trunk/modules/binding-jms/src/main/java/org/apache/tuscany/sca/binding/jms/JMSBindingProcessor.java @@ -987,6 +987,14 @@ public class JMSBindingProcessor extends BaseStAXArtifactProcessor implements St error(monitor, "ConnectionFactoryActivationSpecContradiction", jmsBinding, connectionFactoryName, activationSpecName ); } } + + // If activation spec and destination are both specified, they have to match + if ( ( jmsBinding.getActivationSpecName() != null ) && (jmsBinding.getActivationSpecName().length() > 0 ) && + (jmsBinding.getDestinationName() != null) && (jmsBinding.getDestinationName().length() > 0 ) ) { + if ( !jmsBinding.getActivationSpecName().equals(jmsBinding.getDestinationName())) { + error(monitor, "ActivationSpecAndDestinationMismatch", jmsBinding, jmsBinding.getActivationSpecName(), jmsBinding.getDestinationName()); + } + } // If Connection factory specified then destination name must also be if (( connectionFactoryName != null ) && ( connectionFactoryName.length() > 0 )) { |