SGF-381 - Enable RegionFactoryBean to respect the Data Policy specified on a nested or referenced RegionAttributes bean definition.
Added additional test cases to test and cover different combinations of data-policy and persistent attribute settings with explicit RegionFactoryBean and nested RegionAttributesFatoryBean 'bean' definitions in Spring XML configuration meta-data.
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:gfe="http://www.springframework.org/schema/gemfire"
|
||||
xmlns:p="http://www.springframework.org/schema/p"
|
||||
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/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="gemfireProperties">
|
||||
<prop key="name">InvalidDataPolicyPersistentAttributeSettingsTest</prop>
|
||||
<prop key="mcast-port">0</prop>
|
||||
<prop key="log-level">warning</prop>
|
||||
</util:properties>
|
||||
|
||||
<gfe:cache properties-ref="gemfireProperties"/>
|
||||
|
||||
<bean class="org.springframework.data.gemfire.test.GemfireTestBeanPostProcessor"/>
|
||||
|
||||
<bean id="Example" class="org.springframework.data.gemfire.RegionFactoryBean" p:cache-ref="gemfireCache"
|
||||
p:persistent="true">
|
||||
<property name="attributes">
|
||||
<bean class="org.springframework.data.gemfire.RegionAttributesFactoryBean" p:dataPolicy="REPLICATE"/>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
</beans>
|
||||
@@ -11,7 +11,7 @@
|
||||
">
|
||||
|
||||
<util:properties id="gemfireProperties">
|
||||
<prop key="name">RawRegionBeanDefinitionTest</prop>
|
||||
<prop key="name">RegionDefinitionUsingBeansNamespaceTest</prop>
|
||||
<prop key="mcast-port">0</prop>
|
||||
<prop key="log-level">warning</prop>
|
||||
</util:properties>
|
||||
@@ -31,4 +31,15 @@
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<bean id="AnotherExample" class="org.springframework.data.gemfire.RegionFactoryBean" p:cache-ref="gemfireCache"
|
||||
p:dataPolicy="PERSISTENT_PARTITION" p:persistent="true">
|
||||
<property name="attributes">
|
||||
<bean class="org.springframework.data.gemfire.RegionAttributesFactoryBean" p:dataPolicy="PARTITION">
|
||||
<property name="partitionAttributes">
|
||||
<bean class="org.springframework.data.gemfire.PartitionAttributesFactoryBean" p:redundantCopies="2"/>
|
||||
</property>
|
||||
</bean>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
</beans>
|
||||
|
||||
Reference in New Issue
Block a user