SGF-738 - Avoid Pool Already Exists Exception on Spring container initialization.

This commit is contained in:
John Blum
2018-04-14 13:17:18 -07:00
parent 75c81c4fa7
commit b13dcffe80
97 changed files with 2999 additions and 2934 deletions

View File

@@ -1,6 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<configuration debug="false">
<statusListener class="ch.qos.logback.core.status.NopStatusListener" />
<appender name="console" class="ch.qos.logback.core.ConsoleAppender">
<encoder>
<pattern>%d %5p %40.40c:%4L - %m%n</pattern>

View File

@@ -1,7 +1,9 @@
<?xml version="1.0"?>
<!DOCTYPE cache PUBLIC "-//GemStone Systems, Inc.//GemFire Declarative Caching 8.0//EN"
"http://www.gemstone.com/dtd/cache8_0.dtd">
<cache>
<?xml version="1.0" encoding="UTF-8"?>
<cache xmlns="http://geode.apache.org/schema/cache"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://geode.apache.org/schema/cache http://geode.apache.org/schema/cache/cache-1.0.xsd"
version="1.0">
<region name="NativeLocalRegion" refid="LOCAL">
<region-attributes initial-capacity="1" load-factor="0.95">
<key-constraint>java.lang.Integer</key-constraint>
@@ -20,4 +22,5 @@
<value-constraint>java.lang.String</value-constraint>
</region-attributes>
</region>
</cache>

View File

@@ -1,22 +1,26 @@
<?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
">
<context:property-placeholder/>
<util:properties id="gemfireProperties">
<prop key="name">CacheUsingSharedConfigurationIntegrationTest</prop>
<prop key="mcast-port">0</prop>
<prop key="log-level">warning</prop>
<prop key="locators">localhost[20668]</prop>
<prop key="log-level">error</prop>
<prop key="locators">localhost[${spring.data.gemfire.locator.port:20668}]</prop>
</util:properties>
<gfe:cache cache-xml-location="/clusterconfig-cache.xml" properties-ref="gemfireProperties"
<gfe:cache cache-xml-location="/non-cluster-config-cache.xml" properties-ref="gemfireProperties"
use-bean-factory-locator="false" use-cluster-configuration="true"/>
<gfe:lookup-region id="ClusterConfigRegion"/>

View File

@@ -1,22 +1,25 @@
<?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
">
<context:property-placeholder/>
<util:properties id="gemfireProperties">
<prop key="name">CacheNotUsingSharedConfigurationIntegrationTest</prop>
<prop key="mcast-port">0</prop>
<prop key="log-level">warning</prop>
<prop key="locators">localhost[20668]</prop>
<prop key="log-level">error</prop>
<prop key="locators">localhost[${spring.data.gemfire.locator.port:20668}]</prop>
</util:properties>
<gfe:cache cache-xml-location="/clusterconfig-cache.xml" properties-ref="gemfireProperties"
<gfe:cache cache-xml-location="/non-cluster-config-cache.xml" properties-ref="gemfireProperties"
use-bean-factory-locator="false" use-cluster-configuration="false"/>
<!-- Should throw an Exception! -->

View File

@@ -3,25 +3,19 @@
xmlns:context="http://www.springframework.org/schema/context"
xmlns:gfe="http://www.springframework.org/schema/gemfire"
xmlns:gfe-data="http://www.springframework.org/schema/data/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/data/gemfire http://www.springframework.org/schema/data/gemfire/spring-data-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.client.server.host">localhost</prop>
<prop key="gemfire.client.server.port">42084</prop>
</util:properties>
<context:property-placeholder properties-ref="client.properties"/>
<context:property-placeholder/>
<gfe-data:datasource min-connections="1" max-connections="1">
<gfe-data:server host="${gemfire.client.server.host}" port="${gemfire.client.server.port}"/>
<gfe-data:server host="${spring.data.gemfire.cache.server.host:localhost}"
port="${spring.data.gemfire.cache.server.port:40404}"/>
</gfe-data:datasource>
<gfe:client-region id="ClientOnlyRegion" shortcut="LOCAL"/>

View File

@@ -2,31 +2,19 @@
<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/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="serverProperties">
<prop key="gemfire.cache.server.host">localhost</prop>
<prop key="gemfire.cache.server.port">42084</prop>
</util:properties>
<context:property-placeholder/>
<context:property-placeholder properties-ref="serverProperties"/>
<gfe:cache/>
<util:properties id="gemfireProperties">
<prop key="name">GemFireDataSourceIntegrationTestServer</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.host}" port="${gemfire.cache.server.port}"
<gfe:cache-server bind-address="${spring.data.gemfire.cache.server.host:localhost}"
port="${spring.data.gemfire.cache.server.port:40404}"
auto-startup="true" max-connections="1"/>
<gfe:replicated-region id="ClientServerRegion" persistent="false"/>

View File

@@ -4,16 +4,16 @@
xmlns:util="http://www.springframework.org/schema/util"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="
http://www.springframework.org/schema/gemfire http://www.springframework.org/schema/gemfire/spring-gemfire.xsd
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.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"
default-lazy-init="true">
default-lazy-init="true">
<bean class="org.springframework.data.gemfire.test.GemfireTestBeanPostProcessor"/>
<util:properties id="gemfireProperties">
<prop key="disable-tcp">false</prop>
<prop key="log-level">warning</prop>
<prop key="log-level">error</prop>
</util:properties>
<gfe:cache/>
@@ -33,12 +33,16 @@
<gfe:cache id="cache-with-auto-reconnect-enabled" properties-ref="gemfireProperties" enable-auto-reconnect="true"/>
<gfe:cache id="cache-with-no-bean-factory-locator" properties-ref="gemfireProperties" use-bean-factory-locator="false"/>
<gfe:cache id="cache-with-use-cluster-configuration-disabled" use-cluster-configuration="false"/>
<gfe:cache id="cache-with-use-cluster-configuration-enabled" use-cluster-configuration="true"/>
<gfe:cache id="heap-tuned-cache" properties-ref="gemfireProperties" critical-heap-percentage="70.0" eviction-heap-percentage="60.0"/>
<gfe:cache id="off-heap-tuned-cache" properties-ref="gemfireProperties" critical-off-heap-percentage="90.0" eviction-off-heap-percentage="50.0"/>
<gfe:cache id="no-bean-factory-locator-cache" properties-ref="gemfireProperties" use-bean-factory-locator="false"/>
<gfe:client-cache id="client-cache-with-name"/>
<gfe:client-cache id="client-cache-with-xml" cache-xml-location="classpath:gemfire-client-cache.xml"/>

View File

@@ -23,11 +23,9 @@
<bean class="org.springframework.data.gemfire.test.GemfireTestBeanPostProcessor"/>
<util:properties id="gemfireProperties">
<prop key="log-level">warning</prop>
</util:properties>
<gfe:client-cache/>
<gfe:client-cache properties-ref="gemfireProperties"/>
<gfe:pool/>
<gfe:client-region id="simple" name="SimpleRegion"/>
@@ -81,9 +79,7 @@
shortcut="CACHING_PROXY"
value-constraint="java.lang.String"/>
<bean id="mockCache" class="org.springframework.data.gemfire.config.xml.ClientRegionNamespaceTest$MockCacheFactoryBean"/>
<gfe:client-region id="client-with-interests" ignore-if-exists="true" shortcut="PROXY" cache-ref="mockCache">
<gfe:client-region id="client-with-interests" ignore-if-exists="true" shortcut="PROXY">
<gfe:key-interest durable="${client.interests.durable}" receive-values="${client.interests.receive-values}"
result-policy="${client.key.interests.result-policy}">
<bean class="java.lang.String">
@@ -95,7 +91,6 @@
result-policy="${client.regex.interests.result-policy}"/>
</gfe:client-region>
<bean id="gemfire-pool" class="java.lang.Object" lazy-init="true"/>
<bean id="c-listener" class="org.springframework.data.gemfire.SimpleCacheListener"/>
<bean id="testCompressor" class="org.springframework.data.gemfire.config.xml.ClientRegionNamespaceTest$TestCompressor" p:name="STD"/>

View File

@@ -15,7 +15,8 @@
<util:properties id="gemfireProperties">
<prop key="name">ReplicatedNamespaceConfig</prop>
<prop key="mcast-port">0</prop>
<prop key="log-level">warning</prop>
<prop key="log-level">error</prop>
<prop key="off-heap-memory-size">64m</prop>
</util:properties>
<gfe:cache properties-ref="gemfireProperties"/>

View File

@@ -15,8 +15,7 @@
<util:properties id="gemfireProperties">
<prop key="name">RepositoryClientRegionIntegrationTestsServer</prop>
<prop key="mcast-port">0</prop>
<prop key="log-level">warning</prop>
<prop key="log-level">error</prop>
</util:properties>
<gfe:cache properties-ref="gemfireProperties"/>