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/core/src/main/java/org/apache/tuscany/sca/core/runtime/DefaultDomainRegistryFactory.java14
1 files changed, 10 insertions, 4 deletions
diff --git a/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/runtime/DefaultDomainRegistryFactory.java b/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/runtime/DefaultDomainRegistryFactory.java
index 9ee7934b1e..8bd5df8386 100644
--- a/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/runtime/DefaultDomainRegistryFactory.java
+++ b/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/runtime/DefaultDomainRegistryFactory.java
@@ -76,7 +76,7 @@ public class DefaultDomainRegistryFactory implements DomainRegistryFactory, Life
}
String key;
- if (endpointRegistryURI.startsWith("tuscany:")){
+ if (endpointRegistryURI.startsWith("tuscany:") || endpointRegistryURI.startsWith("tuscanyClient:")){
key = "tuscany:," + domainURI;
} else {
key = endpointRegistryURI + "," + domainURI;
@@ -92,9 +92,13 @@ public class DefaultDomainRegistryFactory implements DomainRegistryFactory, Life
if (endpointRegistry != null) {
return endpointRegistry;
}
+ // see if its a tuscany: one (TODO: need to clean all this up)
+ endpointRegistry = endpointRegistries.get(domainURI + "," + domainURI);
+ if (endpointRegistry != null) {
+ return endpointRegistry;
+ }
- URI uri = URI.create(endpointRegistryURI);
- String scheme = uri.getScheme();
+ String scheme = "tuscanyClient:".equals(endpointRegistryURI) ? "tuscanyClient" : URI.create(endpointRegistryURI).getScheme();
if (scheme != null) {
scheme = scheme.toLowerCase();
} else {
@@ -130,7 +134,9 @@ public class DefaultDomainRegistryFactory implements DomainRegistryFactory, Life
for (EndpointListener listener : listeners) {
endpointRegistry.addListener(listener);
}
- endpointRegistries.put(key, endpointRegistry);
+ if (!"tuscanyClient:".equals(endpointRegistryURI)) {
+ endpointRegistries.put(key, endpointRegistry);
+ }
return endpointRegistry;
}