Examples of ReferenceJobFactory


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

      }
      mainJob
            .setJobExecutionListeners(new JobExecutionListener[] { mainJobExecutionListener });
      mainJob.setJobRepository(jobRepository);
      mainJob.afterPropertiesSet();
      JobFactory jobFactory = new ReferenceJobFactory(mainJob);
      jobRegistry.register(jobFactory);
      logger.info("registered job: " + mainJob.getName());
      JobParameters mainJobParameters = new JobParameters(mainJobParams);
      JobExecution mainJobExecution =
            jobLauncher.run(mainJob, mainJobParameters);
View Full Code Here

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

  @Rule
  public ExpectedException thrown = ExpectedException.none();

  @Before
  public void init() throws Exception {
    jobRegistry.register(new ReferenceJobFactory(new SimpleJob("foo")));
    adapter.setJobLocator(jobRegistry);
    adapter.setJobExplorer(jobExplorer);
  }
View Full Code Here

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

  private StringToJobLaunchRequestAdapter adapter = new StringToJobLaunchRequestAdapter();
  private MapJobRegistry jobRegistry = new MapJobRegistry();

  @Before
  public void init() throws Exception {
    jobRegistry.register(new ReferenceJobFactory(new SimpleJob("foo")));
    jobRegistry.register(new ReferenceJobFactory(new SimpleJob("foo-bar")));
    adapter.setJobLocator(jobRegistry);
  }
View Full Code Here

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

    ApplicationContext context = createApplicationContextFactory(
        CapAppContext.getApplicationContext(), resource);
    Job j = context.getBean(job.getJobId(), Job.class);
    jobRegistry.unregister(j.getName());
    try {
      jobRegistry.register(new ReferenceJobFactory(j));
    } catch (DuplicateJobException e) {
      e.getMessage();
    }
  }// ;
View Full Code Here

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

  private JobRegistry jobRegistry;

  @Before
  public void setUp() throws Exception {
    if (!jobRegistry.getJobNames().contains(job.getName())) {
      jobRegistry.register(new ReferenceJobFactory(job));
    }
  }
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.