1 22 23 package org.jboss.spring.kernel; 24 25 import org.springframework.beans.factory.BeanFactory; 26 import org.springframework.beans.factory.BeanFactoryAware; 27 import org.springframework.beans.factory.BeanNameAware; 28 import org.springframework.beans.factory.config.ConfigurableBeanFactory; 29 30 37 public class ContextMicrocontainerConfigurer extends MicrocontainerConfigurer 38 implements BeanNameAware, BeanFactoryAware 39 { 40 41 private String beanName; 42 private BeanFactory beanFactory; 43 44 public ContextMicrocontainerConfigurer() 45 { 46 setLocator(new KernelBinderLocator()); 47 } 48 49 53 protected boolean checkBean(ConfigurableBeanFactory beanFactoryToProcess, String beanName) 54 { 55 return !(beanName.equals(this.beanName) && beanFactoryToProcess.equals(this.beanFactory)); 56 } 57 58 67 public void setBeanName(String beanName) 68 { 69 this.beanName = beanName; 70 } 71 72 81 public void setBeanFactory(BeanFactory beanFactory) 82 { 83 this.beanFactory = beanFactory; 84 } 85 86 } 87 | Popular Tags |