You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tuscany.apache.org by an...@apache.org on 2010/01/28 16:09:16 UTC
svn commit: r904120 -
/tuscany/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/runtime/DefaultDomainRegistryFactory.java
Author: antelder
Date: Thu Jan 28 15:09:16 2010
New Revision: 904120
URL: http://svn.apache.org/viewvc?rev=904120&view=rev
Log:
Some more temporary hardcoding in the default registry factory, will be removed when we clean all this up
Modified:
tuscany/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/runtime/DefaultDomainRegistryFactory.java
Modified: tuscany/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/runtime/DefaultDomainRegistryFactory.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/runtime/DefaultDomainRegistryFactory.java?rev=904120&r1=904119&r2=904120&view=diff
==============================================================================
--- tuscany/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/runtime/DefaultDomainRegistryFactory.java (original)
+++ tuscany/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/runtime/DefaultDomainRegistryFactory.java Thu Jan 28 15:09:16 2010
@@ -76,7 +76,7 @@
}
String key;
- if (endpointRegistryURI.startsWith("tuscany:")){
+ if (endpointRegistryURI.startsWith("tuscany:") || endpointRegistryURI.startsWith("tuscanyClient:")){
key = "tuscany:," + domainURI;
} else {
key = endpointRegistryURI + "," + domainURI;
@@ -92,9 +92,13 @@
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 @@
for (EndpointListener listener : listeners) {
endpointRegistry.addListener(listener);
}
- endpointRegistries.put(key, endpointRegistry);
+ if (!"tuscanyClient:".equals(endpointRegistryURI)) {
+ endpointRegistries.put(key, endpointRegistry);
+ }
return endpointRegistry;
}