summaryrefslogtreecommitdiffstats
path: root/sca-java-2.x
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--sca-java-2.x/trunk/modules/binding-jms/src/main/java/org/apache/tuscany/sca/binding/jms/JMSBindingProcessor.java5
-rw-r--r--sca-java-2.x/trunk/modules/binding-jms/src/main/resources/binding-jms-validation-messages.properties1
2 files changed, 6 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 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();
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 91b24bb1a2..73d7705927 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
@@ -56,3 +56,4 @@ MissingNameForCREATE_NEVER = Must specify jndiName attribute when create mode is
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}
+ActivationSpecNameRequiredForCreateAlways = A JNDI name must be specified when an ActivationSpec has a create mode of "always"