Package org.springframework.context.support

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


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

        }
       
        applicationContext.refresh();

        return applicationContext;
    }

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


          "/org/geomajas/spring/geomajasContext.xml " +
          "/org/geomajas/layer/bean/beanContext.xml " +
          "/org/geomajas/layer/bean/layerBeans.xml " +
          "/org/geomajas/internal/configuration/layerTreeInvalid.xml " +
          "");
      context.refresh();
      Assert.fail("Context initialization should have failed.");
    } catch (BeanCreationException bce) {
      Assert.assertTrue(bce.getCause().getMessage().startsWith(
          "A LayerTreeNodeInfo object can only reference layers which are part of the map, layer "));
    }
View Full Code Here

          "/org/geomajas/spring/geomajasContext.xml " +
          "/org/geomajas/layer/bean/beanContext.xml " +
          "/org/geomajas/layer/bean/layerBeans.xml " +
          "/org/geomajas/internal/configuration/layerBeansInvalid.xml " +
          "");
      context.refresh();
      Assert.fail("Context initialization should have failed.");
    } catch (BeanCreationException bce) {
      Assert.assertTrue(bce.getCause().getCause().getMessage().contains(
          "manyToOne.stringAttr"));
    }
View Full Code Here

     */

    ClassPathXmlApplicationContext ctx = new ClassPathXmlApplicationContext();
    ctx.getEnvironment().setActiveProfiles(lang);
    ctx.setConfigLocation("/META-INF/spring/integration/cafeDemo.xml");
    ctx.refresh();
  }


  private static void usage() {
    System.out.println("missing or invalid commannd line argument [groovy,ruby,javascript,python]");
View Full Code Here

    if (channel == null) {
      ConfigurableApplicationContext ctx = new ClassPathXmlApplicationContext(
          new String[] { "/META-INF/spring/integration/dynamic-ftp-outbound-adapter-context.xml" },
          false);
      this.setEnvironmentForCustomer(ctx, customer);
      ctx.refresh();
      channel = ctx.getBean("toFtpChannel", MessageChannel.class);
      this.channels.put(customer, channel);
      //Will works as the same reference is presented always
      this.contexts.put(channel, ctx);
    }
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

    checkDBVersion();

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

                rootContext
        );

        mainContext.addBeanFactoryPostProcessor(propertyPlaceholderConfigurer);
        mainContext.setConfigLocation(JBNODE_XML);
        mainContext.refresh();

        jbNode = (JBNode)mainContext.getBean("jbNode");
        boolean hasErrors = false;

        for(String module : modules) {
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

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.