summaryrefslogtreecommitdiffstats
path: root/sca-java-2.x/trunk/modules/implementation-java
diff options
context:
space:
mode:
authorslaws <slaws@13f79535-47bb-0310-9956-ffa450edef68>2012-03-01 13:58:17 +0000
committerslaws <slaws@13f79535-47bb-0310-9956-ffa450edef68>2012-03-01 13:58:17 +0000
commit1145f9016edab7341e06afef3a815027041a61c1 (patch)
tree11481cb90f31de4510107b868728a23928b4d194 /sca-java-2.x/trunk/modules/implementation-java
parent17e573358db8a4a83247037b957db32127bdd00a (diff)
TUSCANY-4020 - move a few more hardcoded message strings into properties files
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1295564 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-java-2.x/trunk/modules/implementation-java')
-rw-r--r--sca-java-2.x/trunk/modules/implementation-java/src/main/java/org/apache/tuscany/sca/implementation/java/xml/JavaImplementationProcessor.java13
-rw-r--r--sca-java-2.x/trunk/modules/implementation-java/src/main/resources/impl-javaxml-validation-messages.properties1
2 files changed, 9 insertions, 5 deletions
diff --git a/sca-java-2.x/trunk/modules/implementation-java/src/main/java/org/apache/tuscany/sca/implementation/java/xml/JavaImplementationProcessor.java b/sca-java-2.x/trunk/modules/implementation-java/src/main/java/org/apache/tuscany/sca/implementation/java/xml/JavaImplementationProcessor.java
index ebf905ec44..93120652ad 100644
--- a/sca-java-2.x/trunk/modules/implementation-java/src/main/java/org/apache/tuscany/sca/implementation/java/xml/JavaImplementationProcessor.java
+++ b/sca-java-2.x/trunk/modules/implementation-java/src/main/java/org/apache/tuscany/sca/implementation/java/xml/JavaImplementationProcessor.java
@@ -61,11 +61,9 @@ import org.apache.tuscany.sca.implementation.java.introspect.JavaIntrospectionHe
import org.apache.tuscany.sca.interfacedef.Compatibility;
import org.apache.tuscany.sca.interfacedef.IncompatibleInterfaceContractException;
import org.apache.tuscany.sca.interfacedef.Interface;
-import org.apache.tuscany.sca.interfacedef.InterfaceContract;
import org.apache.tuscany.sca.interfacedef.InterfaceContractMapper;
import org.apache.tuscany.sca.interfacedef.java.JavaInterface;
import org.apache.tuscany.sca.interfacedef.java.JavaInterfaceContract;
-import org.apache.tuscany.sca.interfacedef.wsdl.WSDLDefinition;
import org.apache.tuscany.sca.interfacedef.wsdl.WSDLInterface;
import org.apache.tuscany.sca.interfacedef.wsdl.WSDLInterfaceContract;
import org.apache.tuscany.sca.monitor.Monitor;
@@ -216,9 +214,14 @@ public class JavaImplementationProcessor implements StAXArtifactProcessor<JavaIm
javaImplementation.getServices().add(assemblyFactory.createService());
}
} catch (Throwable e) {
- throw new ContributionResolveException("Resolving Java implementation: " + javaImplementation.getName()
- + ", "
- + e.getMessage(), e);
+
+ String message = context.getMonitor().getMessageString(JavaImplementationProcessor.class.getName(),
+ "impl-javaxml-validation-messages",
+ "ResolvingJavaImplementation");
+ message = message.replace("{0}", javaImplementation.getName());
+ message = message.replace("{1}", e.getMessage());
+
+ throw new ContributionResolveException(message, e);
} // end try
} // end method
diff --git a/sca-java-2.x/trunk/modules/implementation-java/src/main/resources/impl-javaxml-validation-messages.properties b/sca-java-2.x/trunk/modules/implementation-java/src/main/resources/impl-javaxml-validation-messages.properties
index 4976bc0e9f..2358aaa43e 100644
--- a/sca-java-2.x/trunk/modules/implementation-java/src/main/resources/impl-javaxml-validation-messages.properties
+++ b/sca-java-2.x/trunk/modules/implementation-java/src/main/resources/impl-javaxml-validation-messages.properties
@@ -21,3 +21,4 @@
ClassNotFoundException = Class Not Found Exception: {0}
ContributionResolveException = Contribution Resolve Exception occured due to:
IllegalSCAAnnotation = [JCA9002] SCA annotations are not permitted on static members: {0}.{1}
+ResolvingJavaImplementation = Resolving Java implementation: {0}, {1} \ No newline at end of file