SGF-396 - Enable support for variable Locator and Server endpoints on a SDG GFE Pool bean definition in a Spring Context.
Removed the SDG XSD schema restriction requiring the use of at least 1 <gfe:locator> of <gfe:server> sub-element on the <gfe:pool> element. Also added a default Locator endpoint on localhost listening on the Locators default port of 10334 when no Locator or Server endpoints were specified, either by way of explicit use of the 'locators' or 'servers' attribute or a corresponding <gfe:locator> or <gfe:server> sub-element.
This commit is contained in:
@@ -81,6 +81,12 @@ class PoolParser extends AbstractSimpleBeanDefinitionParser {
|
||||
locators.addAll(parseLocators(element));
|
||||
servers.addAll(parseServers(element));
|
||||
|
||||
// NOTE if neither Locators or Servers were specified, then setup a default connection to a Locator
|
||||
// running on localhost listening on the default Locator port (10334) for convenience
|
||||
if (locators.isEmpty() && servers.isEmpty()) {
|
||||
locators.add(buildConnection(DEFAULT_HOST, String.valueOf(DEFAULT_LOCATOR_PORT), false));
|
||||
}
|
||||
|
||||
if (!locators.isEmpty()) {
|
||||
builder.addPropertyValue("locators", locators);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user