summaryrefslogtreecommitdiffstats
path: root/sca-java-2.x/trunk
diff options
context:
space:
mode:
Diffstat (limited to 'sca-java-2.x/trunk')
-rw-r--r--sca-java-2.x/trunk/modules/sca-client-impl/src/main/java/org/apache/tuscany/sca/client/impl/SCAClientFactoryImpl.java10
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;