private Map<String, ?> getBeansOfType(Class<?> type) { Map<String, ?> beans = beanFactory.getBeansOfType(type); // Check ancestor bean factories if they exist and the current one has none of the // required type BeanFactory parent = beanFactory.getParentBeanFactory(); while (parent != null && beans.size() == 0) { if (parent instanceof ListableBeanFactory) { beans = ((ListableBeanFactory) parent).getBeansOfType(type); } if (parent instanceof HierarchicalBeanFactory) { parent = ((HierarchicalBeanFactory) parent).getParentBeanFactory(); } else { break; } } return beans; }
/** * Setter for application context * * @param context * App context */ public void setApplicationContext(ApplicationContext context) { this.applicationContext = context; String deploymentType = System.getProperty("red5.deployment.type"); logger.debug("Deployment type: " + deploymentType); if (deploymentType == null) { // standalone core context String config = System.getProperty("red5.conf_file"); if (config == null) { config = "red5.xml"; } coreContext = ContextSingletonBeanFactoryLocator.getInstance(config).useBeanFactory("red5.core").getFactory(); } else { logger.info("Setting parent bean factory as core"); coreContext = applicationContext.getParentBeanFactory(); } }
private Map<String, ?> getBeansOfType(Class<?> type) { Map<String, ?> beans = beanFactory.getBeansOfType(type); // Check ancestor bean factories if they exist and the current one has none of the // required type BeanFactory parent = beanFactory.getParentBeanFactory(); while (parent != null && beans.size() == 0) { if (parent instanceof ListableBeanFactory) { beans = ((ListableBeanFactory) parent).getBeansOfType(type); } if (parent instanceof HierarchicalBeanFactory) { parent = ((HierarchicalBeanFactory) parent).getParentBeanFactory(); } else { break; } } return beans; }
/** * Delegates to internal ApplicationContext supplied by constructor */ public final BeanFactory getParentBeanFactory() { return context.getParentBeanFactory(); }
public BeanFactory getParentBeanFactory() { return applicationContext.getParentBeanFactory(); } public boolean containsLocalBean(String name) {
/** * @return * @see org.springframework.beans.factory.HierarchicalBeanFactory#getParentBeanFactory() */ public BeanFactory getParentBeanFactory() { return target.getParentBeanFactory(); }
@Override public BeanFactory getParentBeanFactory() { return wrapped.getParentBeanFactory(); }
public BeanFactory getParentBeanFactory() { return applicationContext.getParentBeanFactory(); }
@Override public BeanFactory getParentBeanFactory() { return applicationContext.getParentBeanFactory(); }
public BeanFactory getParentBeanFactory() { return wrappedApplicationContext.getParentBeanFactory(); }
@Override public BeanFactory getParentBeanFactory() { return applicationContext.getParentBeanFactory(); }
private Map<String,?> getBeansOfType(Class<?> type) { Map<String,?> beans = beanFactory.getBeansOfType(type); // Check ancestor bean factories if they exist and the current one has none of the required type BeanFactory parent = beanFactory.getParentBeanFactory(); while (parent != null && beans.size() == 0) { if (parent instanceof ListableBeanFactory) { beans = ((ListableBeanFactory)parent).getBeansOfType(type); } if (parent instanceof HierarchicalBeanFactory) { parent = ((HierarchicalBeanFactory)parent).getParentBeanFactory(); } else { break; } } return beans; }
private Map<String, ?> getBeansOfType(Class<?> type) { Map<String, ?> beans = beanFactory.getBeansOfType(type); // Check ancestor bean factories if they exist and the current one has none of the // required type BeanFactory parent = beanFactory.getParentBeanFactory(); while (parent != null && beans.size() == 0) { if (parent instanceof ListableBeanFactory) { beans = ((ListableBeanFactory) parent).getBeansOfType(type); } if (parent instanceof HierarchicalBeanFactory) { parent = ((HierarchicalBeanFactory) parent).getParentBeanFactory(); } else { break; } } return beans; }
if (loggerLoader != null) { ConfigurableBeanFactory beanFactory = (ConfigurableBeanFactory) applicationContext.getParentBeanFactory(); beanFactory.destroyBean(FlumeLoggerLoader.PROTOTYPE_BEAN_NAME, loggerLoader); loggerLoader = null; ConfigurableBeanFactory beanFactory = (ConfigurableBeanFactory) applicationContext.getParentBeanFactory(); beanFactory.destroyBean(FlumeLoggerLoader.PROTOTYPE_BEAN_NAME, loggerLoader); loggerLoader = null;