SGF-441 - Fix possible CacheClosedException in ClientCacheFactoryBean onApplicationEvent(:ContextRefreshedEvent) when the ClientCache initialization is lazy.

This commit is contained in:
John Blum
2015-10-17 23:17:31 -07:00
parent af343a45fa
commit f645e7d1a4
12 changed files with 207 additions and 39 deletions

View File

@@ -12,30 +12,31 @@
<!-- all beans are lazy to allow the same config to be used between multiple tests -->
<!-- as there can be only one GemFire cache per VM -->
<util:properties id="gemfireProperties">
<prop key="disable-tcp">false</prop>
<prop key="log-level">warning</prop>
</util:properties>
<gfe:cache/>
<gfe:cache id="cache-with-name"/>
<util:properties id="gemfireProperties">
<prop key="disable-tcp">false</prop>
</util:properties>
<gfe:cache id="cache-with-xml-and-props" cache-xml-location="classpath:gemfire-cache.xml" properties-ref="gemfireProperties"
pdx-read-serialized="true" pdx-ignore-unread-fields="false" pdx-persistent="true"/>
<gfe:cache id="cache-with-gateway-conflict-resolver">
<gfe:cache id="cache-with-gateway-conflict-resolver" properties-ref="gemfireProperties">
<gfe:gateway-conflict-resolver>
<bean class="org.springframework.data.gemfire.config.CacheNamespaceTest.TestGatewayConflictResolver"/>
</gfe:gateway-conflict-resolver>
</gfe:cache>
<gfe:cache id="cache-with-auto-reconnect-disabled" enable-auto-reconnect="false"/>
<gfe:cache id="cache-with-auto-reconnect-disabled" properties-ref="gemfireProperties" enable-auto-reconnect="false"/>
<gfe:cache id="cache-with-auto-reconnect-enabled" enable-auto-reconnect="true"/>
<gfe:cache id="cache-with-auto-reconnect-enabled" properties-ref="gemfireProperties" enable-auto-reconnect="true"/>
<gfe:cache id="heap-tuned-cache" critical-heap-percentage="70.0" eviction-heap-percentage="60.0"/>
<gfe:cache id="heap-tuned-cache" properties-ref="gemfireProperties" critical-heap-percentage="70.0" eviction-heap-percentage="60.0"/>
<gfe:cache id="no-bean-factory-locator" use-bean-factory-locator="false"/>
<gfe:cache id="no-bean-factory-locator-cache" properties-ref="gemfireProperties" use-bean-factory-locator="false"/>
<gfe:client-cache id="client-cache-with-name"/>

View File

@@ -11,16 +11,16 @@
http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util.xsd
">
<context:property-placeholder location="classpath:port.properties"/>
<util:properties id="gemfireProperties">
<prop key="name">PoolNamespaceConfig</prop>
<prop key="mcast-port">0</prop>
<prop key="log-level">error</prop>
<prop key="log-level">warning</prop>
</util:properties>
<gfe:client-cache properties-ref="gemfireProperties"/>
<context:property-placeholder location="classpath:port.properties"/>
<gfe:pool>
<gfe:locator host="localhost" port="${gfe.port}"/>
</gfe:pool>
@@ -29,7 +29,7 @@
<gfe:pool id="locator" locators="skullbox, yorktown[12480]"/>
<gfe:pool id="complex" free-connection-timeout="2000" idle-timeout="20000" load-conditioning-interval="10000"
<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"