From 57ae16a7a130222cb4665ae459f8f920b5b191b7 Mon Sep 17 00:00:00 2001 From: slaws Date: Thu, 22 Sep 2011 13:59:28 +0000 Subject: 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 --- .../apache/tuscany/sca/client/impl/SCAClientFactoryImpl.java | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'sca-java-2.x/trunk/modules') 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 getService(Class serviceInterface, String serviceURI) throws NoSuchServiceException, NoSuchDomainException { + public T getService(Class 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)((RemoteServiceInvocationHandler)handler).serviceInterface; -- cgit v1.2.3