diff options
author | antelder <antelder@13f79535-47bb-0310-9956-ffa450edef68> | 2010-05-13 13:55:18 +0000 |
---|---|---|
committer | antelder <antelder@13f79535-47bb-0310-9956-ffa450edef68> | 2010-05-13 13:55:18 +0000 |
commit | a5bb8381e1a977f6fc1bb47194394c0953de5d0e (patch) | |
tree | b95c31257e79d8b81f1c462258154d0f354d5228 /sca-java-2.x/trunk/modules/sca-client-impl/src/main/java/org/apache/tuscany/sca/client/impl/SCAClientHandler.java | |
parent | 98e3f5879517a0f7974b7a3387c8088e6b57d444 (diff) |
Update to throw NoSuchDomainException/NoSuchServiceException as appropriate instead of other exceptions
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@943885 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-java-2.x/trunk/modules/sca-client-impl/src/main/java/org/apache/tuscany/sca/client/impl/SCAClientHandler.java')
-rw-r--r-- | sca-java-2.x/trunk/modules/sca-client-impl/src/main/java/org/apache/tuscany/sca/client/impl/SCAClientHandler.java | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/sca-java-2.x/trunk/modules/sca-client-impl/src/main/java/org/apache/tuscany/sca/client/impl/SCAClientHandler.java b/sca-java-2.x/trunk/modules/sca-client-impl/src/main/java/org/apache/tuscany/sca/client/impl/SCAClientHandler.java index f1dd14f129..4fb38e4ca6 100644 --- a/sca-java-2.x/trunk/modules/sca-client-impl/src/main/java/org/apache/tuscany/sca/client/impl/SCAClientHandler.java +++ b/sca-java-2.x/trunk/modules/sca-client-impl/src/main/java/org/apache/tuscany/sca/client/impl/SCAClientHandler.java @@ -22,10 +22,6 @@ package org.apache.tuscany.sca.client.impl; import java.lang.reflect.InvocationHandler;
import java.lang.reflect.Method;
import java.lang.reflect.Proxy;
-import java.net.InetAddress;
-import java.net.NetworkInterface;
-import java.net.ServerSocket;
-import java.util.Enumeration;
import java.util.List;
import java.util.Properties;
import java.util.UUID;
@@ -59,6 +55,7 @@ import org.apache.tuscany.sca.runtime.RuntimeComponent; import org.apache.tuscany.sca.runtime.RuntimeComponentReference;
import org.apache.tuscany.sca.runtime.RuntimeEndpointReference;
import org.apache.tuscany.sca.runtime.RuntimeProperties;
+import org.oasisopen.sca.NoSuchDomainException;
import org.oasisopen.sca.NoSuchServiceException;
import org.oasisopen.sca.ServiceRuntimeException;
@@ -90,11 +87,19 @@ public class SCAClientHandler implements InvocationHandler { if (registryURI.indexOf(":") == -1) {
registryURI = "tuscanyclient:" + registryURI;
}
+ if (registryURI.startsWith("uri:")) {
+ registryURI = "tuscanyclient:" + registryURI.substring(4);
+ }
if (registryURI.startsWith("tuscany:")) {
registryURI = "tuscanyclient:" + registryURI.substring(8);
}
- EndpointRegistry endpointRegistry = domainRegistryFactory.getEndpointRegistry(registryURI, domainURI);
+ EndpointRegistry endpointRegistry;
+ try {
+ endpointRegistry = domainRegistryFactory.getEndpointRegistry(registryURI, domainURI);
+ } catch (Exception e) {
+ throw new NoSuchDomainException(domainURI, e);
+ }
FactoryExtensionPoint factories = extensionsRegistry.getExtensionPoint(FactoryExtensionPoint.class);
AssemblyFactory assemblyFactory = factories.getFactory(AssemblyFactory.class);
|