Package org.springframework.batch.core.configuration.support

Examples of org.springframework.batch.core.configuration.support.GenericApplicationContextFactory


   * @param resource the location of the XML configuration
   *
   * @return an application context containing jobs
   */
  protected ApplicationContextFactory createApplicationContextFactory(ApplicationContext parent, Resource resource) {
    GenericApplicationContextFactory applicationContextFactory = new GenericApplicationContextFactory(resource);
    if (parent != null) {
      applicationContextFactory.setApplicationContext(parent);
    }
    return applicationContextFactory;
  }
View Full Code Here


  @EnableBatchProcessing(modular=true)
  public static class LoaderFactoryConfiguration {

    @Bean
    public ApplicationContextFactory jobContextFactory() {
      return new GenericApplicationContextFactory(TestConfiguration.class);

    }
View Full Code Here

    }

    @Bean
    public ApplicationContextFactory vanillaContextFactory() {
      return new GenericApplicationContextFactory(VanillaConfiguration.class);
    }
View Full Code Here

    @Autowired
    private AutomaticJobRegistrar registrar;

    @PostConstruct
    public void initialize() {
      registrar.addApplicationContextFactory(new GenericApplicationContextFactory(TestConfiguration.class));
      registrar.addApplicationContextFactory(new GenericApplicationContextFactory(VanillaConfiguration.class));
    }
View Full Code Here

      for (int j = 0; j < resources.length; j++) {

        Resource path = resources[j];
        logger.info("Registering Job definitions from " + Arrays.toString(resources));

        GenericApplicationContextFactory factory = new GenericApplicationContextFactory(path);
        factory.setApplicationContext(parentContext);
        jobLoader.load(factory);
      }

    }
View Full Code Here

TOP

Related Classes of org.springframework.batch.core.configuration.support.GenericApplicationContextFactory

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.