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
This commit is contained in:
parent
c7c095e3bb
commit
7046efb30d
1 changed files with 8 additions and 2 deletions
|
@ -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();
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue