Early solution for SGF-248 concerning bootstrapping a Spring ApplicationContext inside a GemFire Server-based JVM process when starting the GemFire Server from Gfsh.

This commit is contained in:
John Blum
2014-01-23 19:30:16 -08:00
parent 217732b7f7
commit 8e57cc05a3
8 changed files with 683 additions and 0 deletions

View File

@@ -0,0 +1,22 @@
<?xml version="1.0"?>
<!DOCTYPE cache PUBLIC "-//GemStone Systems, Inc.//GemFire Declarative Caching 7.0//EN"
"http://www.gemstone.com/dtd/cache7_0.dtd">
<cache>
<region name="Users" refid="REPLICATE">
<region-attributes initial-capacity="101" load-factor="0.85">
<cache-loader>
<class-name>org.springframework.data.gemfire.support.SpringContextBootstrappingInitializerTest$UserDataStoreCacheLoader</class-name>
</cache-loader>
</region-attributes>
</region>
<initializer>
<class-name>org.springframework.data.gemfire.support.SpringContextBootstrappingInitializer</class-name>
<parameter name="contextConfigLocations">
<string>
classpath:org/springframework/data/gemfire/support/initializer-gemfire-context.xml,
classpath:org/springframework/data/gemfire/support/initializer-dao-context.xml,
classpath:org/springframework/data/gemfire/support/initializer-services-context.xml
</string>
</parameter>
</initializer>
</cache>

View File

@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:context="http://www.springframework.org/schema/context"
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
">
<context:annotation-config/>
<bean id="userDataSource" class="org.springframework.data.gemfire.support.SpringContextBootstrappingInitializerTest$TestDataSource"/>
<bean id="userDao" class="org.springframework.data.gemfire.support.SpringContextBootstrappingInitializerTest$TestUserDao"/>
</beans>

View File

@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:gfe="http://www.springframework.org/schema/gemfire"
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/gemfire http://www.springframework.org/schema/gemfire/spring-gemfire.xsd
">
<gfe:cache/>
<gfe:replicated-region id="TestRegion" persistent="false"/>
</beans>

View File

@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:context="http://www.springframework.org/schema/context"
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
">
<context:annotation-config/>
<bean name="userService" class="org.springframework.data.gemfire.support.SpringContextBootstrappingInitializerTest$TestUserService"/>
</beans>