SGF-535 - Allow both SpEL and property placeholder expressions to be used in the locators/servers attributes of the <gfe:pool> XML namespace element.
This commit is contained in:
@@ -17,12 +17,18 @@
|
||||
<prop key="gemfire.cache.client.locators.hosts-and-ports">backspace,jambox[11235],skullbox[12480]</prop>
|
||||
<prop key="gemfire.cache.client.server.1.host">saturn</prop>
|
||||
<prop key="gemfire.cache.client.server.1.port">41414</prop>
|
||||
<prop key="gemfire.cache.client.server.2.host">mars</prop>
|
||||
<prop key="gemfire.cache.client.server.2.port">5112</prop>
|
||||
<prop key="gemfire.cache.client.servers.hosts-and-ports">boombox[1234],jambox,toolbox[81$81%]*</prop>
|
||||
</util:properties>
|
||||
|
||||
<context:property-placeholder properties-ref="clientProperties"/>
|
||||
|
||||
<bean class="org.springframework.data.gemfire.client.PoolUsingLocatorsAndServersPropertyPlaceholdersTest.TestBeanFactoryPostProcessor"/>
|
||||
<bean class="org.springframework.data.gemfire.client.PoolsConfiguredWithLocatorsAndServersExpressionsIntegrationTests.TestBeanFactoryPostProcessor"/>
|
||||
|
||||
<bean id="spelBean" class="org.springframework.data.gemfire.client.PoolsConfiguredWithLocatorsAndServersExpressionsIntegrationTests.SpELBoundBean">
|
||||
<constructor-arg index="0" ref="clientProperties"/>
|
||||
</bean>
|
||||
|
||||
<gfe:pool id="locatorPool" locators="${gemfire.cache.client.locators.hosts-and-ports}">
|
||||
<gfe:locator host="${gemfire.cache.client.locator.1.host}" port="${gemfire.cache.client.locator.1.port}"/>
|
||||
@@ -30,10 +36,13 @@
|
||||
</gfe:pool>
|
||||
|
||||
<gfe:pool id="serverPool" servers="mercury[1234],venus[9876],earth[4554],jupiter[],uranis[$Ox0+(!)*]">
|
||||
<gfe:server host="#{spelBean.serverTwoHost()}" port="#{spelBean.serverTwoPort()}"/>
|
||||
<gfe:server host="${gemfire.cache.client.server.1.host}" port="${gemfire.cache.client.server.1.port}"/>
|
||||
<gfe:server host="neptune" port="42424"/>
|
||||
</gfe:pool>
|
||||
|
||||
<gfe:pool id="anotherLocatorPool" locators="[10335], cardboardbox[], #{spelBean.locatorsHostsPorts()}"/>
|
||||
|
||||
<gfe:pool id="anotherServerPool" servers="${gemfire.cache.client.servers.hosts-and-ports}"/>
|
||||
|
||||
</beans>
|
||||
@@ -25,25 +25,25 @@
|
||||
|
||||
<gfe:pool id="simple"/>
|
||||
|
||||
<gfe:pool id="locator" locators="skullbox, yorktown[12480]"/>
|
||||
<gfe:pool id="locator" locators="skullbox, ghostrider[12480]"/>
|
||||
|
||||
<gfe:pool id="server" free-connection-timeout="2000" idle-timeout="20000" load-conditioning-interval="10000"
|
||||
keep-alive="true" max-connections="100" min-connections="5" multi-user-authentication="true"
|
||||
ping-interval="5000" pr-single-hop-enabled="false" read-timeout="500" retry-attempts="5"
|
||||
server-group="TestGroup" socket-buffer-size="65536" statistic-interval="5000"
|
||||
server-group="TestGroup" socket-buffer-size="65536" statistic-interval="250"
|
||||
subscription-ack-interval="250" subscription-enabled="true" subscription-message-tracking-timeout="30000"
|
||||
subscription-redundancy="2" thread-local-connections="true">
|
||||
subscription-redundancy="2" thread-local-connections="false">
|
||||
<gfe:server host="localhost" port="${gfe.port.4}"/>
|
||||
<gfe:server host="localhost" port="40405"/>
|
||||
<gfe:server host="localhost" port="50505"/>
|
||||
</gfe:pool>
|
||||
|
||||
<gfe:pool id="combo-locators" locators="lavatube[11235], zod">
|
||||
<gfe:locator host="foobar" port="55421"/>
|
||||
<gfe:pool id="locators" locators="venus[11235], mars, [12480]">
|
||||
<gfe:locator host="earth" port="54321"/>
|
||||
</gfe:pool>
|
||||
|
||||
<gfe:pool id="combo-servers" servers="skullbox[9110]">
|
||||
<gfe:server host="scorch" port="21480"/>
|
||||
<gfe:server host="scorn" port="51515"/>
|
||||
<gfe:pool id="servers" servers="skullbox[9110]">
|
||||
<gfe:server host="duke" port="21480"/>
|
||||
<gfe:server host="nukem" port="51515"/>
|
||||
</gfe:pool>
|
||||
|
||||
</beans>
|
||||
|
||||
Reference in New Issue
Block a user