summaryrefslogtreecommitdiffstats
path: root/sca-java-2.x/trunk/modules/core/src/main
diff options
context:
space:
mode:
authorantelder <antelder@13f79535-47bb-0310-9956-ffa450edef68>2010-01-28 15:09:16 +0000
committerantelder <antelder@13f79535-47bb-0310-9956-ffa450edef68>2010-01-28 15:09:16 +0000
commit98e7b0bb0fff8a44240b985a9793ee503b6f18a2 (patch)
tree77d052eeacd1db54c318da15c0f650c405920718 /sca-java-2.x/trunk/modules/core/src/main
parent1410ab37319f8f94e98bcdbfc15a7bf08cec7c25 (diff)
Some more temporary hardcoding in the default registry factory, will be removed when we clean all this up
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@904120 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-java-2.x/trunk/modules/core/src/main')
-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;
}