Package org.springframework.context.support

Examples of org.springframework.context.support.ClassPathXmlApplicationContext.refresh()


public class BusApplicationListenerTest extends Assert {
   
    @Test
    public void testParentApplicationEvent() {
        AbstractRefreshableApplicationContext parent = new ClassPathXmlApplicationContext();
        parent.refresh();
        SpringBusFactory factory = new SpringBusFactory(parent);
        Bus bus = factory.createBus();
        CXFBusLifeCycleManager manager = bus.getExtension(CXFBusLifeCycleManager.class);
        BusLifeCycleListener listener = EasyMock.createMock(BusLifeCycleListener.class);
        manager.registerLifeCycleListener(listener);
View Full Code Here


    serverForAgent = new Server();

    try {
      ClassPathXmlApplicationContext parentSpringAppContext =
          new ClassPathXmlApplicationContext();
      parentSpringAppContext.refresh();
      ConfigurableListableBeanFactory factory = parentSpringAppContext.
          getBeanFactory();
      factory.registerSingleton("guiceInjector",
          injector);
      factory.registerSingleton("passwordEncoder",
View Full Code Here

    checkDBVersion();

    try {
      ClassPathXmlApplicationContext parentSpringAppContext =
          new ClassPathXmlApplicationContext();
      parentSpringAppContext.refresh();
      ConfigurableListableBeanFactory factory = parentSpringAppContext.
          getBeanFactory();
      factory.registerSingleton("guiceInjector",
          injector);
      factory.registerSingleton("passwordEncoder",
View Full Code Here

    try {
      final ClassPathXmlApplicationContext ac = new ClassPathXmlApplicationContext(new String[] {
        beanDefRef.toString()
      }, false);
      ac.setClassLoader(AbstractEntityGraphPopulator.class.getClassLoader());
      ac.refresh();
      return ac;
    }
    catch(final BeanDefinitionStoreException e) {
      // presume the file could't be found at root of classpath
      // so fallback on a file-based class loader
View Full Code Here

      // so fallback on a file-based class loader
      final FileSystemXmlApplicationContext ac = new FileSystemXmlApplicationContext(new String[] {
        beanDefRef.toString()
      }, false);
      ac.setClassLoader(AbstractEntityGraphPopulator.class.getClassLoader());
      ac.refresh();
      return ac;
    }
  }

  private final ListableBeanFactory beanFactory;
View Full Code Here

            try {
              final ClassPathXmlApplicationContext ac = new ClassPathXmlApplicationContext(new String[] {
                beanDefRef.toString()
              }, false);
              ac.setClassLoader(getClass().getClassLoader());
              ac.refresh();
              return ac;
            }
            catch(final BeanDefinitionStoreException e) {
              // presume the file could't be found at root of classpath
              // so fallback on a file-based class loader
View Full Code Here

              // so fallback on a file-based class loader
              final FileSystemXmlApplicationContext ac = new FileSystemXmlApplicationContext(new String[] {
                beanDefRef.toString()
              }, false);
              ac.setClassLoader(getClass().getClassLoader());
              ac.refresh();
              return ac;
            }
          }
        });
View Full Code Here

            applicationContext.addBeanFactoryPostProcessor(
                    new ProgressMonitoringBeanFactoryPostProcessor(tracker, messageSource));

        }

        applicationContext.refresh();

        return applicationContext;
    }

    private void setRootApplicationContext(ApplicationContext context) {
View Full Code Here

public class BusApplicationListenerTest extends Assert {
   
    @Test
    public void testParentApplicationEvent() {
        AbstractRefreshableApplicationContext parent = new ClassPathXmlApplicationContext();
        parent.refresh();
        SpringBusFactory factory = new SpringBusFactory(parent);
        Bus bus = factory.createBus();
        CXFBusLifeCycleManager manager = bus.getExtension(CXFBusLifeCycleManager.class);
        BusLifeCycleListener listener = EasyMock.createMock(BusLifeCycleListener.class);
        manager.registerLifeCycleListener(listener);
View Full Code Here

                return null//To change body of implemented methods use File | Settings | File Templates.
            }
        }));
        ClassPathXmlApplicationContext ctx = new ClassPathXmlApplicationContext(new String[] {"bundle.xml"}, false);
        ctx.addBeanFactoryPostProcessor(processor);
        ctx.refresh();
        Object str = ctx.getBean("string");
        System.err.println(str);
        assertNotNull(str);
        assertEquals("bundle://" + bundleId + "///schema.xsd", str);
    }
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.