summaryrefslogtreecommitdiffstats
path: root/sca-java-2.x/trunk/modules/core-spi
diff options
context:
space:
mode:
authorantelder <antelder@13f79535-47bb-0310-9956-ffa450edef68>2010-04-21 08:06:49 +0000
committerantelder <antelder@13f79535-47bb-0310-9956-ffa450edef68>2010-04-21 08:06:49 +0000
commit7046efb30dd467438a64c012aa347c998ee9d267 (patch)
treee2ba4cf9793de11dd6a537928d561d4e9b3b51bd /sca-java-2.x/trunk/modules/core-spi
parentc7c095e3bbf03cbd8879d4513a0a422456b3d903 (diff)
Pick up the default scheme from runtime properties
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@936191 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-java-2.x/trunk/modules/core-spi')
-rw-r--r--sca-java-2.x/trunk/modules/core-spi/src/main/java/org/apache/tuscany/sca/runtime/ExtensibleDomainRegistryFactory.java10
1 files changed, 8 insertions, 2 deletions
diff --git a/sca-java-2.x/trunk/modules/core-spi/src/main/java/org/apache/tuscany/sca/runtime/ExtensibleDomainRegistryFactory.java b/sca-java-2.x/trunk/modules/core-spi/src/main/java/org/apache/tuscany/sca/runtime/ExtensibleDomainRegistryFactory.java
index aa242f76c8..22429006aa 100644
--- a/sca-java-2.x/trunk/modules/core-spi/src/main/java/org/apache/tuscany/sca/runtime/ExtensibleDomainRegistryFactory.java
+++ b/sca-java-2.x/trunk/modules/core-spi/src/main/java/org/apache/tuscany/sca/runtime/ExtensibleDomainRegistryFactory.java
@@ -37,9 +37,15 @@ import org.oasisopen.sca.ServiceRuntimeException;
public class ExtensibleDomainRegistryFactory implements DomainRegistryFactory {
private final DomainRegistryFactoryExtensionPoint factories;
private String[] allSchemes;
+ private String defaultScheme = "tuscany";
public ExtensibleDomainRegistryFactory(ExtensionPointRegistry registry) {
this.factories = registry.getExtensionPoint(DomainRegistryFactoryExtensionPoint.class);
+ RuntimeProperties ps = registry.getExtensionPoint(UtilityExtensionPoint.class).getUtility(RuntimeProperties.class);
+ if (ps.getProperties().containsKey("defaultScheme")) {
+ defaultScheme = ps.getProperties().getProperty("defaultScheme");
+ }
+
}
public ExtensibleDomainRegistryFactory(DomainRegistryFactoryExtensionPoint factories) {
@@ -86,8 +92,8 @@ public class ExtensibleDomainRegistryFactory implements DomainRegistryFactory {
}
}
- scheme = "vm";
- endpointRegistryURI = "vm:" + endpointRegistryURI;
+ scheme = defaultScheme;
+ endpointRegistryURI = scheme + ":" + endpointRegistryURI;
} else {
scheme = scheme.toLowerCase();
}