demonstrate problem trying to create subregions

This commit is contained in:
David Turanski
2012-06-05 17:00:29 -04:00
parent ea5540675c
commit 40cb46a682
10 changed files with 680 additions and 393 deletions

View File

@@ -0,0 +1,13 @@
package org.springframework.data.gemfire;
import org.junit.Test;
public class SubRegionFactoryBeanTest {
@Test
public void test() throws Exception {
SubRegionFactoryBean srfb = new SubRegionFactoryBean();
srfb.setName("child");
srfb.afterPropertiesSet();
SubRegion sr = srfb.getObject();
}
}

View File

@@ -18,15 +18,18 @@ package org.springframework.data.gemfire.config;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertSame;
import static org.junit.Assert.assertTrue;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.BeanCreationException;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationContext;
import org.springframework.data.gemfire.RegionFactoryBean;
import org.springframework.data.gemfire.RegionLookupFactoryBean;
import org.springframework.data.gemfire.SubRegion;
import org.springframework.data.gemfire.TestUtils;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
@@ -87,4 +90,10 @@ public class ReplicatedRegionNamespaceTest {
assertEquals("existing", TestUtils.readField("name", lfb));
assertEquals(existing, context.getBean("lookup"));
}
@Test
public void testNestedRegions() {
Object parent = context.getBean("parent");
//SubRegion child = context.getBean("/parent/child", SubRegion.class);
}
}

View File

@@ -6,6 +6,7 @@ log4j.appender.stdout.layout.ConversionPattern=%d %p [%c] - <%m>%n
log4j.category.org.springframework.data.gemfire.listener=TRACE
log4j.category.org.springframework.data.gemfire.repository=DEBUG
#log4j.category.org.springframework=DEBUG
# for debugging datasource initialization
# log4j.category.test.jdbc=DEBUG

View File

@@ -28,4 +28,8 @@
<bean id="c-writer" class="org.springframework.data.gemfire.SimpleCacheWriter"/>
<gfe:lookup-region id="lookup" name="existing"/>
<gfe:replicated-region id="parent">
<gfe:replicated-region name="child"/>
</gfe:replicated-region>
</beans>