CacheFactoryBean is no longer an initializing bean to address lifecycle issues with client cache and pool

This commit is contained in:
David Turanski
2012-11-26 15:13:13 -05:00
parent 2d30b81e8e
commit 1fbf96db3b
17 changed files with 64 additions and 86 deletions

View File

@@ -27,6 +27,8 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import com.gemstone.gemfire.cache.Cache;
/**
* Integration test for declarable support (and GEF bean factory locator).
@@ -42,6 +44,7 @@ public class DeclarableSupportTest {
@Test
public void testUserObject() throws Exception {
ctx.getBean(Cache.class);
assertNotNull(UserObject.THIS);
UserObject obj = UserObject.THIS;
assertSame(ctx, obj.getBeanFactory());

View File

@@ -47,7 +47,6 @@ public class SubRegionTest extends RecreatingContextTest {
CacheFactoryBean cfb = new CacheFactoryBean();
cfb.setBeanName("gemfireCache");
cfb.setUseBeanFactoryLocator(false);
cfb.afterPropertiesSet();
GemFireCache cache = cfb.getObject();
RegionFactoryBean rfb = new ReplicatedRegionFactoryBean();
rfb.setCache(cache);

View File

@@ -69,7 +69,7 @@ public class FunctionExecutionClientCacheTests {
@ImportResource("/org/springframework/data/gemfire/function/config/FunctionExecutionCacheClientTests-context.xml")
@EnableGemfireFunctionExecutions (basePackages = "org.springframework.data.gemfire.function.config.three",
excludeFilters = {
@ComponentScan.Filter(type=FilterType.ANNOTATION, value=OnRegion.class)/*,
/*@ComponentScan.Filter(type=FilterType.ANNOTATION, value=OnRegion.class),
@ComponentScan.Filter(type=FilterType.ANNOTATION, value=OnServer.class)*/
}
)

View File

@@ -15,8 +15,6 @@ package org.springframework.data.gemfire.function.config;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertSame;
import java.util.Set;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
@@ -24,7 +22,6 @@ import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.ImportResource;
import org.springframework.data.gemfire.TestUtils;
import org.springframework.data.gemfire.function.config.EnableGemfireFunctionExecutions;
import org.springframework.data.gemfire.function.config.two.TestOnRegionFunction;
import org.springframework.data.gemfire.function.execution.GemfireOnRegionFunctionTemplate;
import org.springframework.data.gemfire.function.execution.OnRegionFunctionProxyFactoryBean;
@@ -32,8 +29,6 @@ import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import com.gemstone.gemfire.cache.Region;
import com.gemstone.gemfire.cache.client.ClientCache;
import com.gemstone.gemfire.cache.client.Pool;
/**
* @author David Turanski

View File

@@ -49,7 +49,6 @@ public class GemfireRepositoriesRegistrarIntegrationTest {
public GemFireCache cache() throws Exception {
CacheFactoryBean factory = new CacheFactoryBean();
factory.afterPropertiesSet();
return factory.getObject();
}

View File

@@ -43,7 +43,6 @@ public abstract class AbstractRegionFactoryBeanTest {
CacheFactoryBean cfb = new CacheFactoryBean();
cfb.setBeanName("gemfireCache");
cfb.setUseBeanFactoryLocator(false);
cfb.afterPropertiesSet();
cache = cfb.getObject();
}