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:
22
src/test/resources/cache-with-initializer.xml
Normal file
22
src/test/resources/cache-with-initializer.xml
Normal 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>
|
||||
@@ -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>
|
||||
@@ -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>
|
||||
@@ -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>
|
||||
Reference in New Issue
Block a user