Author: slaws
Date: Thu Sep 22 13:59:28 2011
New Revision: 1174144
URL: http://svn.apache.org/viewvc?rev=1174144&view=rev
Log:
TUSCANY-3950 - and fix the client factory impl for the removal of the
NoSuchDomainException. Need to look into why this exception went away.
Modified:
tuscany/sca-java-2.x/trunk/modules/sca-client-impl/src/main/java/org/apache/tuscany/sca/client/impl/SCAClientFactoryImpl.java
Modified:
tuscany/sca-java-2.x/trunk/modules/sca-client-impl/src/main/java/org/apache/tuscany/sca/client/impl/SCAClientFactoryImpl.java
URL:
http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/modules/sca-client-impl/src/main/java/org/apache/tuscany/sca/client/impl/SCAClientFactoryImpl.java?rev=1174144&r1=1174143&r2=1174144&view=diff
==============================================================================
---
tuscany/sca-java-2.x/trunk/modules/sca-client-impl/src/main/java/org/apache/tuscany/sca/client/impl/SCAClientFactoryImpl.java
(original)
+++
tuscany/sca-java-2.x/trunk/modules/sca-client-impl/src/main/java/org/apache/tuscany/sca/client/impl/SCAClientFactoryImpl.java
Thu Sep 22 13:59:28 2011
@@ -77,7 +77,7 @@ public class SCAClientFactoryImpl extend
}
@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 extend
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;