diff options
author | antelder <antelder@13f79535-47bb-0310-9956-ffa450edef68> | 2011-06-27 08:35:42 +0000 |
---|---|---|
committer | antelder <antelder@13f79535-47bb-0310-9956-ffa450edef68> | 2011-06-27 08:35:42 +0000 |
commit | a46ba8d3bfc7e7cacf0a340c589f7598ab5cdabc (patch) | |
tree | d36b8a9af1f363c110a22de523443db8c034086b | |
parent | fab34c8f3e1b0c0340f8f938b076bd855d5382ae (diff) |
Remove all the code trying to derive a domain name from the uri and instead let the registry do that
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1140052 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to '')
-rw-r--r-- | sca-java-2.x/trunk/modules/domain-node/src/main/java/org/apache/tuscany/sca/TuscanyRuntime.java | 19 |
1 files changed, 4 insertions, 15 deletions
diff --git a/sca-java-2.x/trunk/modules/domain-node/src/main/java/org/apache/tuscany/sca/TuscanyRuntime.java b/sca-java-2.x/trunk/modules/domain-node/src/main/java/org/apache/tuscany/sca/TuscanyRuntime.java index 1f562f5664..08c4e3604f 100644 --- a/sca-java-2.x/trunk/modules/domain-node/src/main/java/org/apache/tuscany/sca/TuscanyRuntime.java +++ b/sca-java-2.x/trunk/modules/domain-node/src/main/java/org/apache/tuscany/sca/TuscanyRuntime.java @@ -113,7 +113,7 @@ public class TuscanyRuntime { try { TuscanyRuntime runtime = newInstance(); String domain = domainURI == null ? DEFAUL_DOMAIN_NAME : domainURI.toString(); - DomainRegistry domainRegistry = runtime.domainRegistryFactory.getEndpointRegistry(domain, getDomainName(domain)); + DomainRegistry domainRegistry = runtime.domainRegistryFactory.getEndpointRegistry(domain, null); NodeImpl node = new NodeImpl(runtime.deployer, runtime.compositeActivator, domainRegistry, runtime.extensionPointRegistry, runtime); if (dependentContributionURLs != null) { @@ -155,11 +155,10 @@ public class TuscanyRuntime { * @return a Node */ public Node createNode(String domainURI) { - String domainName = DEFAUL_DOMAIN_NAME; - if (domainURI != null){ - domainName = getDomainName(domainURI); + if (domainURI == null){ + domainURI = DEFAUL_DOMAIN_NAME; } - DomainRegistry domainRegistry = domainRegistryFactory.getEndpointRegistry(domainURI, domainName); + DomainRegistry domainRegistry = domainRegistryFactory.getEndpointRegistry(domainURI, null); return new NodeImpl(deployer, compositeActivator, domainRegistry, extensionPointRegistry, null); } @@ -337,16 +336,6 @@ public class TuscanyRuntime { return assemblyFactory; } - private static String getDomainName(String domainURI) { - int scheme = domainURI.indexOf(':'); - int qm = domainURI.indexOf('?'); - if (qm == -1) { - return domainURI.substring(scheme+1); - } else { - return domainURI.substring(scheme+1, qm); - } - } - protected NodeConfiguration loadConfiguration(String configURL) { InputStream xml =null; try { |