diff options
author | slaws <slaws@13f79535-47bb-0310-9956-ffa450edef68> | 2011-09-22 13:59:28 +0000 |
---|---|---|
committer | slaws <slaws@13f79535-47bb-0310-9956-ffa450edef68> | 2011-09-22 13:59:28 +0000 |
commit | 57ae16a7a130222cb4665ae459f8f920b5b191b7 (patch) | |
tree | 977bb9648faeae285342ac22e5b2872083bc0c9b /sca-java-2.x/trunk/modules/sca-client-impl/src | |
parent | 8fa39d402acf47d516f6af27bc9bfec164d7e9c6 (diff) |
TUSCANY-3950 - and fix the client factory impl for the removal of the NoSuchDomainException. Need to look into why this exception went away.
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1174144 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-java-2.x/trunk/modules/sca-client-impl/src')
-rw-r--r-- | sca-java-2.x/trunk/modules/sca-client-impl/src/main/java/org/apache/tuscany/sca/client/impl/SCAClientFactoryImpl.java | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/sca-java-2.x/trunk/modules/sca-client-impl/src/main/java/org/apache/tuscany/sca/client/impl/SCAClientFactoryImpl.java b/sca-java-2.x/trunk/modules/sca-client-impl/src/main/java/org/apache/tuscany/sca/client/impl/SCAClientFactoryImpl.java index 7c4afb2660..698e42ccd5 100644 --- a/sca-java-2.x/trunk/modules/sca-client-impl/src/main/java/org/apache/tuscany/sca/client/impl/SCAClientFactoryImpl.java +++ b/sca-java-2.x/trunk/modules/sca-client-impl/src/main/java/org/apache/tuscany/sca/client/impl/SCAClientFactoryImpl.java @@ -77,7 +77,7 @@ public class SCAClientFactoryImpl extends SCAClientFactory { } @Override - public <T> T getService(Class<T> serviceInterface, String serviceURI) throws NoSuchServiceException, NoSuchDomainException { + public <T> T getService(Class<T> serviceInterface, String serviceURI) throws NoSuchServiceException{ String serviceName = null; if (serviceURI.contains("/")) { @@ -105,7 +105,13 @@ public class SCAClientFactoryImpl extends SCAClientFactory { handler = new RemoteServiceInvocationHandler(extensionPointRegistry, domainRegistry, serviceURI, serviceInterface); } else { // no local runtime - handler = new RemoteServiceInvocationHandler(extensionPointRegistry, domainRegistry, getDomainURI().toString(), serviceURI, serviceInterface); + // TUSCANY-3590 - convert NoSuchDomainException to NoSuchService exception while + // we findout why this interface has changed + try { + handler = new RemoteServiceInvocationHandler(extensionPointRegistry, domainRegistry, getDomainURI().toString(), serviceURI, serviceInterface); + } catch (NoSuchDomainException ex){ + throw new NoSuchServiceException(ex); + } } if (serviceInterface == null) { serviceInterface = (Class<T>)((RemoteServiceInvocationHandler)handler).serviceInterface; |