/** * Determine whether the specified bean is eligible for inclusion in the * LiveBeansView JSON snapshot. * @param beanName the name of the bean * @param bd the corresponding bean definition * @param bf the containing bean factory * @return {@code true} if the bean is to be included; {@code false} otherwise */ protected boolean isBeanEligible(String beanName, BeanDefinition bd, ConfigurableBeanFactory bf) { return (bd.getRole() != BeanDefinition.ROLE_INFRASTRUCTURE && (!bd.isLazyInit() || bf.containsSingleton(beanName))); }
/** * Determine whether the specified bean is eligible for inclusion in the * LiveBeansView JSON snapshot. * @param beanName the name of the bean * @param bd the corresponding bean definition * @param bf the containing bean factory * @return {@code true} if the bean is to be included; {@code false} otherwise */ protected boolean isBeanEligible(String beanName, BeanDefinition bd, ConfigurableBeanFactory bf) { return (bd.getRole() != BeanDefinition.ROLE_INFRASTRUCTURE && (!bd.isLazyInit() || bf.containsSingleton(beanName))); }
if (factory.containsSingleton(name)) { log.warn("Singleton {} already exists, try unload first", name); return; log.debug("Lookup common - bean:{} local:{} singleton:{}", new Object[] { factory.containsBean("red5.common"), factory.containsLocalBean("red5.common"), factory.containsSingleton("red5.common"), }); parentContext = (ApplicationContext) factory.getBean("red5.common");
if (factory.containsSingleton(name)) { log.debug("Context found in parent, destroying: {}", name); FileSystemXmlApplicationContext ctx = (FileSystemXmlApplicationContext) factory.getSingleton(name); ctx.destroy(); } finally { if (factory.containsSingleton(name)) { log.debug("Singleton still exists, trying another destroy method"); ((DefaultListableBeanFactory) factory).destroySingleton(name);
private static boolean isBeanEligible(String beanName, BeanDefinition bd, ConfigurableBeanFactory bf) { return (bd.getRole() != BeanDefinition.ROLE_INFRASTRUCTURE && (!bd.isLazyInit() || bf.containsSingleton(beanName))); }
/** * Determine whether the specified bean is eligible for inclusion in the * LiveBeansView JSON snapshot. * @param beanName the name of the bean * @param bd the corresponding bean definition * @param bf the containing bean factory * @return {@code true} if the bean is to be included; {@code false} otherwise */ protected boolean isBeanEligible(String beanName, BeanDefinition bd, ConfigurableBeanFactory bf) { return (bd.getRole() != BeanDefinition.ROLE_INFRASTRUCTURE && (!bd.isLazyInit() || bf.containsSingleton(beanName))); }