summaryrefslogtreecommitdiffstats
path: root/sca-java-2.x/trunk/modules/core
diff options
context:
space:
mode:
authorslaws <slaws@13f79535-47bb-0310-9956-ffa450edef68>2012-02-29 15:06:57 +0000
committerslaws <slaws@13f79535-47bb-0310-9956-ffa450edef68>2012-02-29 15:06:57 +0000
commit17e573358db8a4a83247037b957db32127bdd00a (patch)
tree6f5fdc4e5169f822571dd7b02e3a023d16a351c1 /sca-java-2.x/trunk/modules/core
parenta0a8ac0a56f74f88e0ffbc54aa45a85dbb14c419 (diff)
TUSCANY-4020 - move hardcoded message strings into properties files
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1295144 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-java-2.x/trunk/modules/core')
-rw-r--r--sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/runtime/impl/EndpointReferenceBinderImpl.java15
-rw-r--r--sca-java-2.x/trunk/modules/core/src/main/resources/endpoint-validation-messages.properties3
2 files changed, 13 insertions, 5 deletions
diff --git a/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/runtime/impl/EndpointReferenceBinderImpl.java b/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/runtime/impl/EndpointReferenceBinderImpl.java
index cd8115d201..536534b743 100644
--- a/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/runtime/impl/EndpointReferenceBinderImpl.java
+++ b/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/runtime/impl/EndpointReferenceBinderImpl.java
@@ -42,6 +42,7 @@ import org.apache.tuscany.sca.assembly.builder.BuilderContext;
import org.apache.tuscany.sca.assembly.builder.BuilderExtensionPoint;
import org.apache.tuscany.sca.assembly.builder.CompositeBuilder;
import org.apache.tuscany.sca.assembly.builder.PolicyBuilder;
+import org.apache.tuscany.sca.assembly.xml.Messages;
import org.apache.tuscany.sca.core.ExtensionPointRegistry;
import org.apache.tuscany.sca.core.FactoryExtensionPoint;
import org.apache.tuscany.sca.core.UtilityExtensionPoint;
@@ -211,8 +212,8 @@ public class EndpointReferenceBinderImpl implements EndpointReferenceBinder {
"endpoint-validation-messages",
"NoComponentReferenceTarget",
endpointReference.getReference().getName());
- throw new ServiceRuntimeException("Unable to bind " +
- monitor.getLastProblem().toString());
+ //throw new ServiceRuntimeException("Unable to bind " +
+ // monitor.getLastProblem().toString());
}
}
@@ -295,7 +296,10 @@ public class EndpointReferenceBinderImpl implements EndpointReferenceBinder {
"endpoint-validation-messages",
"NoEndpointsFound",
endpointReference.toString());
- throw new ServiceRuntimeException("Unable to bind " +
+ throw new ServiceRuntimeException(monitor.getMessageString(EndpointReferenceBinderImpl.class.getName(),
+ "endpoint-validation-messages",
+ "UnableToBind") +
+ " " +
monitor.getLastProblem().toString());
}
}
@@ -318,7 +322,10 @@ public class EndpointReferenceBinderImpl implements EndpointReferenceBinder {
"EndpointReferenceCantBeMatched",
endpointReference.toString(),
matchAudit);
- throw new ServiceRuntimeException("Unable to bind " +
+ throw new ServiceRuntimeException(monitor.getMessageString(EndpointReferenceBinderImpl.class.getName(),
+ "endpoint-validation-messages",
+ "UnableToBind") +
+ " " +
monitor.getLastProblem().toString());
} else {
Monitor.warning(monitor,
diff --git a/sca-java-2.x/trunk/modules/core/src/main/resources/endpoint-validation-messages.properties b/sca-java-2.x/trunk/modules/core/src/main/resources/endpoint-validation-messages.properties
index f300010bd4..121baddf5c 100644
--- a/sca-java-2.x/trunk/modules/core/src/main/resources/endpoint-validation-messages.properties
+++ b/sca-java-2.x/trunk/modules/core/src/main/resources/endpoint-validation-messages.properties
@@ -22,4 +22,5 @@ NoEndpointsFound = No endpoints found in the domain that match the reference {0}
EndpointReferenceCantBeMatched = Unable to match the endpoint reference {0} with the policy of the service to which it refers, matching process was {1}
# Single quote (we'll) needs to be escaped as we''ll
ComponentReferenceTargetNotFound = Component reference target not found at deployment time, it might be a remote service elsewhere in the SCA Domain so we''ll try and resolve it again at runtime: {0}
-TooManyTargetServices = [ASM60048] A component reference {0} with only the target component service name specified {1} matches more than one service \ No newline at end of file
+TooManyTargetServices = [ASM60048] A component reference {0} with only the target component service name specified {1} matches more than one service
+UnableToBind = Unable to bind \ No newline at end of file