Package org.springframework.beans.factory.support

Examples of org.springframework.beans.factory.support.StaticListableBeanFactory


  @Override
  @SuppressWarnings("serial")
  protected void setUp() {
    facesContext = new MockFacesContext();
    beanFactory = new StaticListableBeanFactory();

    delPhaseListener = new DelegatingPhaseListenerMulticaster() {
      @Override
      protected ListableBeanFactory getBeanFactory(FacesContext facesContext) {
        return beanFactory;
View Full Code Here


    final IsolationLevelDataSourceRouter dsToUse = new IsolationLevelDataSourceRouter();
    Map<Object, Object> targetDataSources = new HashMap<Object, Object>();
    if (dataSourceLookup) {
      targetDataSources.put("ISOLATION_REPEATABLE_READ", "ds2");
      dsToUse.setDefaultTargetDataSource("ds1");
      StaticListableBeanFactory beanFactory = new StaticListableBeanFactory();
      beanFactory.addBean("ds1", dataSource1);
      beanFactory.addBean("ds2", dataSource2);
      dsToUse.setDataSourceLookup(new BeanFactoryDataSourceLookup(beanFactory));
    }
    else {
      targetDataSources.put("ISOLATION_REPEATABLE_READ", dataSource2);
      dsToUse.setDefaultTargetDataSource(dataSource1);
View Full Code Here

    return method;
  }


  private void initializeFactory(DefaultMessageHandlerMethodFactory factory) {
    factory.setBeanFactory(new StaticListableBeanFactory());
    factory.afterPropertiesSet();
  }
View Full Code Here


  @Before
  public void setup() {
    registrar.setEndpointRegistry(registry);
    registrar.setBeanFactory(new StaticListableBeanFactory());
  }
View Full Code Here

  private void assertListenerMethodInvocation(JmsEndpointSampleBean bean, String methodName) {
    assertTrue("Method " + methodName + " should have been invoked", bean.invocations.get(methodName));
  }

  private void initializeFactory(DefaultMessageHandlerMethodFactory factory) {
    factory.setBeanFactory(new StaticListableBeanFactory());
    factory.afterPropertiesSet();
  }
View Full Code Here

    adapter.setHandlerMethod(factory.createInvocableHandlerMethod(sample, m));
    return adapter;
  }

  private void initializeFactory(DefaultMessageHandlerMethodFactory factory) {
    factory.setBeanFactory(new StaticListableBeanFactory());
    factory.afterPropertiesSet();
  }
View Full Code Here

    int beanCount = scanner.scan(BASE_PACKAGE);
    assertEquals(13, beanCount);
    context.refresh();

    FooServiceImpl fooService = (FooServiceImpl) context.getBean("fooService");
    StaticListableBeanFactory myBf = (StaticListableBeanFactory) context.getBean("myBf");
    MessageSource ms = (MessageSource) context.getBean("messageSource");
    assertTrue(fooService.isInitCalled());
    assertEquals("bar", fooService.foo(123));
    assertSame(context.getDefaultListableBeanFactory(), fooService.beanFactory);
    assertEquals(2, fooService.listableBeanFactory.size());
View Full Code Here

    DefaultJCacheOperationSource source = new DefaultJCacheOperationSource();
    source.setCacheManager(cacheManager);
    source.setCacheResolver(cacheResolver);
    source.setExceptionCacheResolver(exceptionCacheResolver);
    source.setKeyGenerator(keyGenerator);
    source.setBeanFactory(new StaticListableBeanFactory());
    source.afterPropertiesSet();
    source.afterSingletonsInstantiated();
    return source;
  }
View Full Code Here

    return factory.createInvocableHandlerMethod(sample, getListenerMethod(methodName, parameterTypes));
  }

  private DefaultMessageHandlerMethodFactory createInstance() {
    DefaultMessageHandlerMethodFactory factory = new DefaultMessageHandlerMethodFactory();
    factory.setBeanFactory(new StaticListableBeanFactory());
    return factory;
  }
View Full Code Here

  private void assertListenerMethodInvocation(RabbitEndpointSampleBean bean, String methodName) {
    assertTrue("Method " + methodName + " should have been invoked", bean.invocations.get(methodName));
  }

  private void initializeFactory(DefaultMessageHandlerMethodFactory factory) {
    factory.setBeanFactory(new StaticListableBeanFactory());
    factory.afterPropertiesSet();
  }
View Full Code Here

TOP

Related Classes of org.springframework.beans.factory.support.StaticListableBeanFactory

Copyright © 2018 www.massapicom. 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.