From 05531725cf5c9041cf3c719d7fcf011434990d1b Mon Sep 17 00:00:00 2001 From: bdaniel Date: Mon, 30 Aug 2010 16:19:04 +0000 Subject: BJM_3037A Add validation for ActivationSpec with "always" create and no JNDI name git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@990848 13f79535-47bb-0310-9956-ffa450edef68 --- .../java/org/apache/tuscany/sca/binding/jms/JMSBindingProcessor.java | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'sca-java-2.x/trunk/modules/binding-jms/src/main/java/org/apache') 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 dfb3dd9412..3b1518ea5c 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 @@ -996,6 +996,11 @@ public class JMSBindingProcessor extends BaseStAXArtifactProcessor implements St } } + // If activation spec exists with create=always, a jndiName must be specified + if (JMSBindingConstants.CREATE_ALWAYS.equals(jmsBinding.getActivationSpecCreate()) && + (jmsBinding.getActivationSpecName() == null)) { + error(monitor, "ActivationSpecNameRequiredForCreateAlways", jmsBinding); + } // If Connection factory specified then destination name must also be if (( connectionFactoryName != null ) && ( connectionFactoryName.length() > 0 )) { String destinationName = jmsBinding.getDestinationName(); -- cgit v1.2.3