From 5902ece645aa1bd4066497adfda2ace62e92dd36 Mon Sep 17 00:00:00 2001 From: Costin Leau Date: Wed, 24 Aug 2011 22:41:17 +0300 Subject: [PATCH] + fix initialization again --- .../data/gemfire/client/PoolFactoryBean.java | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/src/main/java/org/springframework/data/gemfire/client/PoolFactoryBean.java b/src/main/java/org/springframework/data/gemfire/client/PoolFactoryBean.java index c856091c..65bfa6ea 100644 --- a/src/main/java/org/springframework/data/gemfire/client/PoolFactoryBean.java +++ b/src/main/java/org/springframework/data/gemfire/client/PoolFactoryBean.java @@ -23,12 +23,10 @@ import org.apache.commons.logging.LogFactory; import org.springframework.beans.factory.BeanClassLoaderAware; import org.springframework.beans.factory.BeanFactory; import org.springframework.beans.factory.BeanFactoryAware; -import org.springframework.beans.factory.BeanFactoryUtils; import org.springframework.beans.factory.BeanNameAware; import org.springframework.beans.factory.DisposableBean; import org.springframework.beans.factory.FactoryBean; import org.springframework.beans.factory.InitializingBean; -import org.springframework.beans.factory.config.ConfigurableListableBeanFactory; import org.springframework.util.Assert; import org.springframework.util.CollectionUtils; import org.springframework.util.StringUtils; @@ -108,17 +106,7 @@ public class PoolFactoryBean implements FactoryBean, InitializingBean, Dis } if (beanFactory != null) { - if (beanFactory instanceof ConfigurableListableBeanFactory) { - ConfigurableListableBeanFactory lbf = (ConfigurableListableBeanFactory) beanFactory; - String[] caches = BeanFactoryUtils.beanNamesForTypeIncludingAncestors(lbf, GemFireCache.class, false, - true); - - for (String bn : caches) { - if (!lbf.isCurrentlyInCreation(bn)) { - beanFactory.getBean(bn); - } - } - } + beanFactory.getBean(GemFireCache.class); } // first check the configured pools