diff options
Diffstat (limited to 'sca-java-2.x/trunk/modules/core-spi/src')
-rw-r--r-- | sca-java-2.x/trunk/modules/core-spi/src/main/java/org/apache/tuscany/sca/runtime/ExtensibleDomainRegistryFactory.java | 10 |
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(); } |