From 20f2eba6f4622b605173ed163bba508fd232c132 Mon Sep 17 00:00:00 2001 From: antelder Date: Mon, 21 Jun 2010 12:53:31 +0000 Subject: Change all exception throwing to be Monitor errors git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@956554 13f79535-47bb-0310-9956-ffa450edef68 --- .../org/apache/tuscany/sca/binding/jms/JMSBindingProcessor.java | 6 +++--- .../src/main/resources/binding-jms-validation-messages.properties | 3 +++ 2 files changed, 6 insertions(+), 3 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 66fa4fc65e..63d85b362a 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 @@ -305,13 +305,13 @@ public class JMSBindingProcessor extends BaseStAXArtifactProcessor implements St if (jmsBinding.getRequestWireFormat() == null) { jmsBinding.setRequestWireFormat((WireFormat) extension); } else { - throw new ContributionReadException("The request wireformat has already been defined. " + "Only one request wire format can be specified."); + error(monitor, "WireFormatAlreadyDefined", reader, extension.toString()); } } else if (extension instanceof OperationSelector) { if (jmsBinding.getOperationSelector() == null) { jmsBinding.setOperationSelector((OperationSelector) extension); } else { - throw new ContributionReadException("More than one operation selector has been specified. " + "Only one operation selector can be specified."); + error(monitor, "OpSelectorAlreadyDefined", reader, extension.toString()); } } else { @@ -517,7 +517,7 @@ public class JMSBindingProcessor extends BaseStAXArtifactProcessor implements St if (jmsBinding.getResponseWireFormat() == null) { jmsBinding.setResponseWireFormat((WireFormat)extension); } else { - throw new ContributionReadException("The response wireformat has already been defined. " + "Only one response wire format can be specified."); + error(context.getMonitor(), "ResponseWireformatAlreadyDefined", reader, extension.toString()); } } else { error(context.getMonitor(), "UnexpectedElement", reader, extension.toString()); 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 9361bb0e3c..33d6a9df5c 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 @@ -48,3 +48,6 @@ ConnectionFactoryActivationSpecContradiction = Connection factory \"{0}\" and ac ResponseAttrElement = Response connection \"{0}\" and response element \"{1}\" are mutually exclusive BindingNotFound = {0} refers to a binding definition {1} which is not found DuplicateOperationProperties = Must not use both operationProperties attribute and operationProperties element +WireFormatAlreadyDefined = The request wireformat has already been defined. Only one request wire format can be specified. +OpSelectorAlreadyDefined = More than one operation selector has been specified. Only one operation selector can be specified. +ResponseWireformatAlreadyDefined = The response wireformat has already been defined. Only one response wire format can be specified. -- cgit v1.2.3