SGF-433 - Fix improper resolution of Spring property placeholders in 'locators' and 'servers' attributes on the '<gfe:pool>' element(s) in Spring XML config.
(cherry picked from commit 1cd2a7ff505008c0d985f3ae3129fb0ce62c4f8b) Signed-off-by: John Blum <jblum@pivotal.io>
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<beans xmlns="http://www.springframework.org/schema/beans"
|
||||
xmlns:context="http://www.springframework.org/schema/context"
|
||||
xmlns:gfe="http://www.springframework.org/schema/gemfire"
|
||||
xmlns:util="http://www.springframework.org/schema/util"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="
|
||||
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
|
||||
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd
|
||||
http://www.springframework.org/schema/gemfire http://www.springframework.org/schema/gemfire/spring-gemfire.xsd
|
||||
http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util.xsd
|
||||
">
|
||||
|
||||
<util:properties id="client.properties">
|
||||
<prop key="gemfire.cache.client.locator.host-and-port">localhost[11235]</prop>
|
||||
</util:properties>
|
||||
|
||||
<context:property-placeholder properties-ref="client.properties"/>
|
||||
|
||||
<util:properties id="gemfireProperties">
|
||||
<prop key="log-level">config</prop>
|
||||
</util:properties>
|
||||
|
||||
<gfe:pool locators="${gemfire.cache.client.locator.host-and-port}"/>
|
||||
|
||||
<gfe:client-cache properties-ref="gemfireProperties"/>
|
||||
|
||||
<gfe:client-region id="Example" shortcut="PROXY" key-constraint="java.lang.String" value-constraint="java.lang.Integer"/>
|
||||
|
||||
</beans>
|
||||
@@ -0,0 +1,40 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<beans xmlns="http://www.springframework.org/schema/beans"
|
||||
xmlns:context="http://www.springframework.org/schema/context"
|
||||
xmlns:gfe="http://www.springframework.org/schema/gemfire"
|
||||
xmlns:util="http://www.springframework.org/schema/util"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="
|
||||
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
|
||||
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd
|
||||
http://www.springframework.org/schema/gemfire http://www.springframework.org/schema/gemfire/spring-gemfire.xsd
|
||||
http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util.xsd
|
||||
">
|
||||
|
||||
<util:properties id="server.properties">
|
||||
<prop key="gemfire.cache.server.host">localhost</prop>
|
||||
<prop key="gemfire.cache.server.port">23579</prop>
|
||||
</util:properties>
|
||||
|
||||
<context:property-placeholder properties-ref="server.properties"/>
|
||||
|
||||
<util:properties id="gemfireProperties">
|
||||
<prop key="name">ClientCacheVariableLocatorsTestServer</prop>
|
||||
<prop key="mcast-port">0</prop>
|
||||
<prop key="log-level">warning</prop>
|
||||
<prop key="locators">localhost[11235]</prop>
|
||||
<prop key="start-locator">localhost[11235]</prop>
|
||||
</util:properties>
|
||||
|
||||
<gfe:cache properties-ref="gemfireProperties"/>
|
||||
|
||||
<gfe:cache-server bind-address="${gemfire.cache.server.host}" port="${gemfire.cache.server.port}"
|
||||
auto-startup="true" max-connections="1"/>
|
||||
|
||||
<gfe:replicated-region id="Example" persistent="false" key-constraint="java.lang.String" value-constraint="java.lang.Integer">
|
||||
<gfe:cache-loader>
|
||||
<bean class="org.springframework.data.gemfire.client.ClientCacheVariableLocatorsTest.CacheMissCounterCacheLoader"/>
|
||||
</gfe:cache-loader>
|
||||
</gfe:replicated-region>
|
||||
|
||||
</beans>
|
||||
@@ -0,0 +1,34 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<beans xmlns="http://www.springframework.org/schema/beans"
|
||||
xmlns:context="http://www.springframework.org/schema/context"
|
||||
xmlns:gfe="http://www.springframework.org/schema/gemfire"
|
||||
xmlns:util="http://www.springframework.org/schema/util"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="
|
||||
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
|
||||
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd
|
||||
http://www.springframework.org/schema/gemfire http://www.springframework.org/schema/gemfire/spring-gemfire.xsd
|
||||
http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util.xsd
|
||||
">
|
||||
|
||||
<util:properties id="client.properties">
|
||||
<prop key="gemfire.cache.client.server.hosts-and-ports">localhost[23579],localhost[23654]</prop>
|
||||
<prop key="gemfire.cache.client.server.host.3">localhost</prop>
|
||||
<prop key="gemfire.cache.client.server.port.3">24448</prop>
|
||||
</util:properties>
|
||||
|
||||
<context:property-placeholder properties-ref="client.properties"/>
|
||||
|
||||
<util:properties id="gemfireProperties">
|
||||
<prop key="log-level">warning</prop>
|
||||
</util:properties>
|
||||
|
||||
<gfe:pool servers="${gemfire.cache.client.server.hosts-and-ports}">
|
||||
<gfe:server host="${gemfire.cache.client.server.host.3}" port="${gemfire.cache.client.server.port.3}"/>
|
||||
</gfe:pool>
|
||||
|
||||
<gfe:client-cache properties-ref="gemfireProperties"/>
|
||||
|
||||
<gfe:client-region id="Example" shortcut="PROXY" key-constraint="java.lang.String" value-constraint="java.lang.Integer"/>
|
||||
|
||||
</beans>
|
||||
@@ -0,0 +1,48 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<beans xmlns="http://www.springframework.org/schema/beans"
|
||||
xmlns:context="http://www.springframework.org/schema/context"
|
||||
xmlns:gfe="http://www.springframework.org/schema/gemfire"
|
||||
xmlns:util="http://www.springframework.org/schema/util"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="
|
||||
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
|
||||
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd
|
||||
http://www.springframework.org/schema/gemfire http://www.springframework.org/schema/gemfire/spring-gemfire.xsd
|
||||
http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util.xsd
|
||||
">
|
||||
|
||||
<util:properties id="server.properties">
|
||||
<prop key="gemfire.cache.server.1.host">localhost</prop>
|
||||
<prop key="gemfire.cache.server.1.port">22357</prop>
|
||||
<prop key="gemfire.cache.server.2.host">localhost</prop>
|
||||
<prop key="gemfire.cache.server.2.port">23654</prop>
|
||||
<prop key="gemfire.cache.server.3.host">localhost</prop>
|
||||
<prop key="gemfire.cache.server.3.port">24448</prop>
|
||||
</util:properties>
|
||||
|
||||
<context:property-placeholder properties-ref="server.properties"/>
|
||||
|
||||
<util:properties id="gemfireProperties">
|
||||
<prop key="name">ClientCacheVariableServersTestServer</prop>
|
||||
<prop key="mcast-port">0</prop>
|
||||
<prop key="log-level">warning</prop>
|
||||
</util:properties>
|
||||
|
||||
<gfe:cache properties-ref="gemfireProperties"/>
|
||||
|
||||
<gfe:cache-server bind-address="${gemfire.cache.server.1.host}" port="${gemfire.cache.server.1.port}"
|
||||
auto-startup="true" max-connections="1"/>
|
||||
|
||||
<gfe:cache-server bind-address="${gemfire.cache.server.2.host}" port="${gemfire.cache.server.2.port}"
|
||||
auto-startup="true" max-connections="1"/>
|
||||
|
||||
<gfe:cache-server bind-address="${gemfire.cache.server.3.host}" port="${gemfire.cache.server.3.port}"
|
||||
auto-startup="true" max-connections="1"/>
|
||||
|
||||
<gfe:replicated-region id="Example" persistent="false" key-constraint="java.lang.String" value-constraint="java.lang.Integer">
|
||||
<gfe:cache-loader>
|
||||
<bean class="org.springframework.data.gemfire.client.ClientCacheVariableServersTest.CacheMissCounterCacheLoader"/>
|
||||
</gfe:cache-loader>
|
||||
</gfe:replicated-region>
|
||||
|
||||
</beans>
|
||||
@@ -0,0 +1,36 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<beans xmlns="http://www.springframework.org/schema/beans"
|
||||
xmlns:context="http://www.springframework.org/schema/context"
|
||||
xmlns:gfe="http://www.springframework.org/schema/gemfire"
|
||||
xmlns:util="http://www.springframework.org/schema/util"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="
|
||||
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
|
||||
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd
|
||||
http://www.springframework.org/schema/gemfire http://www.springframework.org/schema/gemfire/spring-gemfire.xsd
|
||||
http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util.xsd
|
||||
">
|
||||
|
||||
<bean class="org.springframework.data.gemfire.client.PoolUsingLocatorsAndServersPropertyPlaceholdersTest.TestBeanFactoryPostProcessor"/>
|
||||
|
||||
<util:properties id="client.properties">
|
||||
<prop key="gemfire.cache.client.locators.hosts-and-ports">backspace,jambox[11235],skullbox[12480]</prop>
|
||||
<prop key="gemfire.cache.client.locator.1.host">pluto</prop>
|
||||
<prop key="gemfire.cache.client.locator.1.port">20668</prop>
|
||||
<prop key="gemfire.cache.client.server.1.host">saturn</prop>
|
||||
<prop key="gemfire.cache.client.server.1.port">41414</prop>
|
||||
</util:properties>
|
||||
|
||||
<context:property-placeholder properties-ref="client.properties"/>
|
||||
|
||||
<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}"/>
|
||||
<gfe:locator host="mars" port="30303"/>
|
||||
</gfe:pool>
|
||||
|
||||
<gfe:pool id="serverPool" servers="mercury[1234],venus[9876],earth[4554],jupiter[],uranis[$Ox0+(!)*]">
|
||||
<gfe:server host="${gemfire.cache.client.server.1.host}" port="${gemfire.cache.client.server.1.port}"/>
|
||||
<gfe:server host="neptune" port="42424"/>
|
||||
</gfe:pool>
|
||||
|
||||
</beans>
|
||||
@@ -30,8 +30,8 @@
|
||||
<gfe:pool id="locator" locators="skullbox, yorktown[12480]"/>
|
||||
|
||||
<gfe:pool id="complex" free-connection-timeout="2000" idle-timeout="20000" load-conditioning-interval="10000"
|
||||
keep-alive="false" max-connections="100" min-connections="5" multi-user-authentication="false"
|
||||
ping-interval="5000" pr-single-hop-enabled="true" read-timeout="500" retry-attempts="5"
|
||||
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"
|
||||
subscription-ack-interval="250" subscription-enabled="true" subscription-message-tracking-timeout="30000"
|
||||
subscription-redundancy="2" thread-local-connections="true">
|
||||
|
||||
Reference in New Issue
Block a user