diff options
Diffstat (limited to 'sca-java-2.x/trunk/modules/binding-jms/src')
2 files changed, 9 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 )) { diff --git a/sca-java-2.x/trunk/modules/binding-jms/src/main/resources/binding-jms-validation-messages.properties b/sca-java-2.x/trunk/modules/binding-jms/src/main/resources/binding-jms-validation-messages.properties index 147290b862..91b24bb1a2 100644 --- a/sca-java-2.x/trunk/modules/binding-jms/src/main/resources/binding-jms-validation-messages.properties +++ b/sca-java-2.x/trunk/modules/binding-jms/src/main/resources/binding-jms-validation-messages.properties @@ -55,3 +55,4 @@ ResponseWireformatAlreadyDefined = The response wireformat has already been defi MissingNameForCREATE_NEVER = Must specify jndiName attribute when create mode is "never" MissingNameForCREATE_IF_NOT_EXIST = Must specify jndiName attribute when create mode is "ifNotExist" InvalidCreate = Attribute create {0} invalid, must be 'always', 'never', or 'ifNotExist' +ActivationSpecAndDestinationMismatch = Activation spec name {0} must match destination name {1} |