Examples of useBeanFactory()


Examples of org.springframework.beans.factory.access.BeanFactoryLocator.useBeanFactory()

  @Test
  public final void testContextLoader() {
    BeanFactoryLocator locator = MyBeanFactoryLocator
        .getInstance("classpath*:/org/company/recordshop/*/beanRefContext.xml");
    BeanFactoryReference reference = locator
        .useBeanFactory("org.company.recordshop.service.Context");
    CustomerServiceModelLocalService service = (CustomerServiceModelLocalService) reference
        .getFactory().getBean("customerServiceModelService");
  }

View Full Code Here

Examples of org.springframework.beans.factory.access.BeanFactoryLocator.useBeanFactory()

            if (logger.isDebugEnabled())
            {
                logger.debug("Getting parent context definition: using parent context key of '" + parentContextKey
                             + "' with BeanFactoryLocator");
            }
            parentContext = (ApplicationContext) locator.useBeanFactory(parentContextKey).getFactory();
        }

        return parentContext;
    }
View Full Code Here

Examples of org.springframework.beans.factory.access.BeanFactoryLocator.useBeanFactory()

      Log logger = LogFactory.getLog(ContextLoader.class);
      if (logger.isDebugEnabled()) {
        logger.debug("Getting parent context definition: using parent context key of '" +
            parentContextKey + "' with BeanFactoryLocator");
      }
      this.parentContextRef = locator.useBeanFactory(parentContextKey);
      parentContext = (ApplicationContext) this.parentContextRef.getFactory();
    }

    return parentContext;
  }
View Full Code Here

Examples of org.springframework.beans.factory.access.BeanFactoryLocator.useBeanFactory()

      Log logger = LogFactory.getLog(ContextLoader.class);
      if (logger.isDebugEnabled()) {
        logger.debug("Getting parent context definition: using parent context key of '" +
            parentContextKey + "' with BeanFactoryLocator");
      }
      this.parentContextRef = locator.useBeanFactory(parentContextKey);
      parentContext = (ApplicationContext) this.parentContextRef.getFactory();
    }

    return parentContext;
  }
View Full Code Here

Examples of org.springframework.beans.factory.access.BeanFactoryLocator.useBeanFactory()

      log.info("No WEB-INF directory found for "
          + context.getContextPath()
          + ", creating default application.");
      BeanFactoryLocator bfl = ContextSingletonBeanFactoryLocator
          .getInstance("red5.xml");
      BeanFactoryReference bfr = bfl.useBeanFactory("red5.common");

      // Create WebScope dynamically
      WebScope scope = new WebScope();
      IServer server = (IServer) bfr.getFactory().getBean(IServer.ID);
      scope.setServer(server);
View Full Code Here

Examples of org.springframework.beans.factory.access.BeanFactoryLocator.useBeanFactory()

      Log logger = LogFactory.getLog(ContextLoader.class);
      if (logger.isDebugEnabled()) {
        logger.debug("Getting parent context definition: using parent context key of '" +
            parentContextKey + "' with BeanFactoryLocator");
      }
      this.parentContextRef = locator.useBeanFactory(parentContextKey);
      parentContext = (ApplicationContext) this.parentContextRef.getFactory();
    }

    return parentContext;
  }
View Full Code Here

Examples of org.springframework.beans.factory.access.BeanFactoryLocator.useBeanFactory()

  public void setUp() {
    StepExecutionCountingDecider.previousStepCount = 0;

    if(jobExplorer == null) {
      BeanFactoryLocator beanFactoryLocactor = ContextSingletonBeanFactoryLocator.getInstance();
      BeanFactoryReference ref = beanFactoryLocactor.useBeanFactory("baseContext");
      baseContext = (ApplicationContext) ref.getFactory();

      baseContext.getAutowireCapableBeanFactory().autowireBeanProperties(this,
          AutowireCapableBeanFactory.AUTOWIRE_BY_NAME, false);
    }
View Full Code Here

Examples of org.springframework.beans.factory.access.BeanFactoryLocator.useBeanFactory()

   * singleton ApplicationContext if one has not already been created (and will utilize the existing
   * one if it has) to populate itself.
   */
  public JsrJobOperator() {
    BeanFactoryLocator beanFactoryLocactor = ContextSingletonBeanFactoryLocator.getInstance();
    BeanFactoryReference ref = beanFactoryLocactor.useBeanFactory("baseContext");
    baseContext = (ApplicationContext) ref.getFactory();

    baseContext.getAutowireCapableBeanFactory().autowireBeanProperties(this,
        AutowireCapableBeanFactory.AUTOWIRE_BY_TYPE, false);

View Full Code Here

Examples of org.springframework.beans.factory.access.BeanFactoryLocator.useBeanFactory()

            if (super.log.isInfoEnabled()) {
                super.log.debug("retrieving singleton instance " + singletonId);
            }

            BeanFactoryLocator bfl = SingletonBeanFactoryLocator.getInstance();
            BeanFactoryReference bf = bfl.useBeanFactory(singletonId);
            ctx = (ApplicationContext) bf.getFactory();

            if (ctx == null) {
                if (super.log.isInfoEnabled()) {
                    super.log.info("singleton " + beanName + " does not exists");
View Full Code Here

Examples of org.springframework.data.gemfire.GemfireBeanFactoryLocator.useBeanFactory()

    assertThat(ReflectionTestUtils.getField(cacheFactoryBean, "factoryLocator"), is(nullValue()));

    GemfireBeanFactoryLocator beanFactoryLocator = new GemfireBeanFactoryLocator();

    try {
      assertNotNull(beanFactoryLocator.useBeanFactory("cache-with-name"));
      beanFactoryLocator.useBeanFactory("no-bean-factory-locator");
    }
    finally {
      beanFactoryLocator.destroy();
    }
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.