Package org.springframework.context

Examples of org.springframework.context.ConfigurableApplicationContext.refresh()


    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 void configure(Object beanInstance) {
        // check the ApplicationContext states first , and call the refresh if necessary
        if (((SpringCamelContext)getCamelContext()).getApplicationContext() instanceof ConfigurableApplicationContext) {
            ConfigurableApplicationContext context = (ConfigurableApplicationContext)((SpringCamelContext)getCamelContext()).getApplicationContext();
            if (!context.isActive()) {
                context.refresh();
            }
        }
        configurer.configureBean(beanId, beanInstance);
    }
View Full Code Here

      {
         locator = new KernelLocator(kernel);
      }
      microcontainerPostProcessor.setLocator(locator);
      applicationContext.addBeanFactoryPostProcessor(microcontainerPostProcessor);
      applicationContext.refresh();
      return applicationContext;
   }

   protected void doClose(BeanFactory beanFactory)
   {
View Full Code Here

        ((AbstractBeanDefinitionReader) reader).setBeanClassLoader(classLoader);
      }
      reader.loadBeanDefinitions(resources);

      // refresh the application context - now we're ready to go
      context.refresh();
      return context;
    }
    finally {
      Thread.currentThread().setContextClassLoader(existing);
    }
View Full Code Here

            applicationServices.setApplicationContext(applicationContext);

            registerBasicServices(applicationServices);
            registerAdditionalServices(applicationServices);

            applicationContext.refresh();
            doSetUp();
        } catch( Exception e ) {
            Application.load(null);
            throw e;
        }
View Full Code Here

    void configure(Object beanInstance) {
        // check the ApplicationContext states first , and call the refresh if necessary
        if (((SpringCamelContext)getCamelContext()).getApplicationContext() instanceof ConfigurableApplicationContext) {
            ConfigurableApplicationContext context = (ConfigurableApplicationContext)((SpringCamelContext)getCamelContext()).getApplicationContext();
            if (!context.isActive()) {
                context.refresh();
            }
        }
        configurer.configureBean(beanId, beanInstance);
    }
   
View Full Code Here

    void configure(Object beanInstance) {
        // check the ApplicationContext states first , and call the refresh if necessary
        if (((SpringCamelContext)getCamelContext()).getApplicationContext() instanceof ConfigurableApplicationContext) {
            ConfigurableApplicationContext context = (ConfigurableApplicationContext)((SpringCamelContext)getCamelContext()).getApplicationContext();
            if (!context.isActive()) {
                context.refresh();
            }
        }
        configurer.configureBean(beanId, beanInstance);
    }
   
View Full Code Here

    void configure(Object beanInstance) {
        // check the ApplicationContext states first , and call the refresh if necessary
        if (((SpringCamelContext)getCamelContext()).getApplicationContext() instanceof ConfigurableApplicationContext) {
            ConfigurableApplicationContext context = (ConfigurableApplicationContext)((SpringCamelContext)getCamelContext()).getApplicationContext();
            if (!context.isActive()) {
                context.refresh();
            }
        }
        configurer.configureBean(beanId, beanInstance);
    }
   
View Full Code Here

    void configure(Object beanInstance) {
        // check the ApplicationContext states first , and call the refresh if necessary
        if (((SpringCamelContext)getCamelContext()).getApplicationContext() instanceof ConfigurableApplicationContext) {
            ConfigurableApplicationContext context = (ConfigurableApplicationContext)((SpringCamelContext)getCamelContext()).getApplicationContext();
            if (!context.isActive()) {
                context.refresh();
            }
        }
        configurer.configureBean(beanId, beanInstance);
    }
   
View Full Code Here

    void configure(Object beanInstance) {
        // check the ApplicationContext states first , and call the refresh if necessary
        if (((SpringCamelContext)getCamelContext()).getApplicationContext() instanceof ConfigurableApplicationContext) {
            ConfigurableApplicationContext context = (ConfigurableApplicationContext)((SpringCamelContext)getCamelContext()).getApplicationContext();
            if (!context.isActive()) {
                context.refresh();
            }
        }
        configurer.configureBean(beanId, beanInstance);
    }
   
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.