assertTrue(applicationContext.containsBean("NativeReplicateRegion"));
assertTrue(applicationContext.containsBean("NativeParentRegion"));
assertTrue(applicationContext.containsBean("/NativeParentRegion/NativeChildRegion"));
assertTrue(applicationContext.containsBean("SpringReplicateRegion"));
Region nativeLocalRegion = applicationContext.getBean("NativeLocalRegion", Region.class);
assertNotNull(nativeLocalRegion);
assertEquals("NativeLocalRegion", nativeLocalRegion.getName());
assertEquals("/NativeLocalRegion", nativeLocalRegion.getFullPath());
assertNotNull(nativeLocalRegion.getAttributes());
assertEquals(DataPolicy.NORMAL, nativeLocalRegion.getAttributes().getDataPolicy());
assertFalse(nativeLocalRegion.getAttributes().getCloningEnabled());
assertFalse(nativeLocalRegion.getAttributes().getConcurrencyChecksEnabled());
assertEquals(80, nativeLocalRegion.getAttributes().getConcurrencyLevel());
assertEquals(101, nativeLocalRegion.getAttributes().getInitialCapacity());
assertEquals(Integer.class, nativeLocalRegion.getAttributes().getKeyConstraint());
assertEquals(new Float(0.95f), new Float(nativeLocalRegion.getAttributes().getLoadFactor()));
assertEquals(String.class, nativeLocalRegion.getAttributes().getValueConstraint());
Region nativePartitionRegion = applicationContext.getBean("NativePartitionRegion", Region.class);
assertNotNull(nativePartitionRegion);
assertEquals("NativePartitionRegion", nativePartitionRegion.getName());
assertEquals("/NativePartitionRegion", nativePartitionRegion.getFullPath());
assertNotNull(nativePartitionRegion.getAttributes());
assertEquals(DataPolicy.PERSISTENT_PARTITION, nativePartitionRegion.getAttributes().getDataPolicy());
assertTrue(nativePartitionRegion.getAttributes().getCloningEnabled());
assertTrue(nativePartitionRegion.getAttributes().getConcurrencyChecksEnabled());
assertEquals(40, nativePartitionRegion.getAttributes().getConcurrencyLevel());
assertEquals(51, nativePartitionRegion.getAttributes().getInitialCapacity());
assertEquals(Integer.class, nativePartitionRegion.getAttributes().getKeyConstraint());
assertEquals(new Float(0.85f), new Float(nativePartitionRegion.getAttributes().getLoadFactor()));
assertFalse(nativePartitionRegion.getAttributes().getMulticastEnabled());
assertEquals(String.class, nativePartitionRegion.getAttributes().getValueConstraint());
Region nativeReplicateRegion = applicationContext.getBean("NativeReplicateRegion", Region.class);
assertNotNull(nativeReplicateRegion);
assertEquals("NativeReplicateRegion", nativeReplicateRegion.getName());
assertEquals("/NativeReplicateRegion", nativeReplicateRegion.getFullPath());
assertNotNull(nativeReplicateRegion.getAttributes());
assertEquals(DataPolicy.PERSISTENT_REPLICATE, nativeReplicateRegion.getAttributes().getDataPolicy());
assertFalse(nativeReplicateRegion.getAttributes().getCloningEnabled());
assertTrue(nativeReplicateRegion.getAttributes().getConcurrencyChecksEnabled());
assertEquals(23, nativeReplicateRegion.getAttributes().getInitialCapacity());
assertEquals(new Float(0.75f), new Float(nativeReplicateRegion.getAttributes().getLoadFactor()));
assertEquals(Integer.class, nativeReplicateRegion.getAttributes().getKeyConstraint());
assertFalse(nativeReplicateRegion.getAttributes().getMulticastEnabled());
assertEquals(Scope.DISTRIBUTED_NO_ACK, nativeReplicateRegion.getAttributes().getScope());
assertEquals(String.class, nativeReplicateRegion.getAttributes().getValueConstraint());
Region nativeChildRegion = applicationContext.getBean("/NativeParentRegion/NativeChildRegion", Region.class);
assertNotNull(nativeChildRegion);
assertEquals("NativeChildRegion", nativeChildRegion.getName());
assertEquals("/NativeParentRegion/NativeChildRegion", nativeChildRegion.getFullPath());
assertNotNull(nativeChildRegion.getAttributes());
assertEquals(DataPolicy.REPLICATE, nativeChildRegion.getAttributes().getDataPolicy());
Region springReplicateRegion = applicationContext.getBean("SpringReplicateRegion", Region.class);
assertNotNull(springReplicateRegion);
assertEquals("SpringReplicateRegion", springReplicateRegion.getName());
assertEquals("/SpringReplicateRegion", springReplicateRegion.getFullPath());
assertNotNull(springReplicateRegion.getAttributes());
assertEquals(DataPolicy.REPLICATE, springReplicateRegion.getAttributes().getDataPolicy());
}
finally {
closeApplicationContext(applicationContext);
}
}