From e513a8fb1a7360f56e788318d8e5521a4ac40a6d Mon Sep 17 00:00:00 2001 From: bdaniel Date: Wed, 8 Sep 2010 13:48:46 +0000 Subject: Add validations for response/activationSpec and response/destination name matching git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@995058 13f79535-47bb-0310-9956-ffa450edef68 --- .../org/apache/tuscany/sca/binding/jms/JMSBindingProcessor.java | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'sca-java-2.x/trunk') 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 0dffea12b5..b01f1b7e76 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 @@ -999,6 +999,12 @@ public class JMSBindingProcessor extends BaseStAXArtifactProcessor implements St } } + if ( ( jmsBinding.getResponseActivationSpecName() != null ) && (jmsBinding.getResponseActivationSpecName().length() > 0 ) && + (jmsBinding.getResponseDestinationName() != null ) && (jmsBinding.getResponseDestinationName().length() > 0 ) ) { + if ( !jmsBinding.getResponseActivationSpecName().equals(jmsBinding.getResponseDestinationName())) { + error(monitor, "ActivationSpecAndDestinationMismatch", jmsBinding, jmsBinding.getResponseActivationSpecName(), jmsBinding.getResponseDestinationName()); + } + } // If activation spec exists with create=always, a jndiName must be specified if (JMSBindingConstants.CREATE_ALWAYS.equals(jmsBinding.getActivationSpecCreate()) && (jmsBinding.getActivationSpecName() == null)) { -- cgit v1.2.3