Package org.springframework.beans.factory.config

Examples of org.springframework.beans.factory.config.ConfigurableBeanFactory.containsBean()


    }

    if (factory instanceof ConfigurableBeanFactory) {
      ConfigurableBeanFactory beanFactory = (ConfigurableBeanFactory) factory;
      for (String autowiredBeanName : autowiredBeanNames) {
        if (beanFactory.containsBean(autowiredBeanName)) {
          beanFactory.registerDependentBean(autowiredBeanName, requestingBeanName);
        }
      }
    }
View Full Code Here


  }

  private void addBeanFactoryDependency() {
    if (beanFactory instanceof ConfigurableBeanFactory) {
      ConfigurableBeanFactory cbf = (ConfigurableBeanFactory) beanFactory;
      if (StringUtils.hasText(beanName) && cbf.containsBean(beanName)) {
        // no need to validate targetBeanName (already did)
        cbf.registerDependentBean(targetBeanName, BeanFactory.FACTORY_BEAN_PREFIX + beanName);
        cbf.registerDependentBean(targetBeanName, beanName);
      }
    }
View Full Code Here

      final Execution exec = Executions.getCurrent();
      if (exec != null) {
        final ConfigurableApplicationContext ctx = (ConfigurableApplicationContext) SpringUtil.getApplicationContext();
        final ConfigurableBeanFactory factory = ctx.getBeanFactory();
        final String fid = "&"+comp.getId();
        if (factory.containsBean(fid)) {
          final Page page = ((ExecutionCtrl)exec).getCurrentPage();
          final Object self = page.hasAttribute("self") ?
              page.getAttribute("self", false) : null;
          try {
            page.setAttribute("self", comp);
View Full Code Here

      return;
    }
    // if parent context was not set then lookup red5.common
    if (parentContext == null) {
      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 (config.startsWith("/")) {
      // Spring always interprets files as relative, so will strip a leading slash unless we tell
      // it otherwise. It also appears to not need this for Windows
View Full Code Here

    }

    if (factory instanceof ConfigurableBeanFactory) {
      ConfigurableBeanFactory beanFactory = (ConfigurableBeanFactory) factory;
      for (String autowiredBeanName : autowiredBeanNames) {
        if (beanFactory.containsBean(autowiredBeanName)) {
          beanFactory.registerDependentBean(autowiredBeanName, requestingBeanName);
        }
      }
    }
View Full Code Here

  }

  private void addBeanFactoryDependency() {
    if (beanFactory instanceof ConfigurableBeanFactory) {
      ConfigurableBeanFactory cbf = (ConfigurableBeanFactory) beanFactory;
      if (StringUtils.hasText(beanName) && cbf.containsBean(beanName)) {
        // no need to validate targetBeanName (already did)
        cbf.registerDependentBean(targetBeanName, BeanFactory.FACTORY_BEAN_PREFIX + beanName);
        cbf.registerDependentBean(targetBeanName, beanName);
      }
    }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.