Package org.springframework.batch.core.launch.support

Examples of org.springframework.batch.core.launch.support.SimpleJobLauncher.afterPropertiesSet()


    @Test
    public void testRunJob() throws Exception {
        SimpleJobLauncher launcher = new SimpleJobLauncher();
        launcher.setJobRepository(new TestDummyJobRepository());
        launcher.afterPropertiesSet();

        Job job = new TestDummyJob("testRunJob");
        JobExecution execution = launcher.run(job, new JobParameters());
        assertNotNull("No job exectuion instance", execution);
View Full Code Here


    }
    if (jobLauncher == null) {
      SimpleJobLauncher jobLauncher = new SimpleJobLauncher();
      jobLauncher.setJobRepository(getJobRepository());
      try {
        jobLauncher.afterPropertiesSet();
      }
      catch (Exception e) {
        throw new StepBuilderException(e);
      }
      this.jobLauncher = jobLauncher;
View Full Code Here

    MapJobRepositoryFactoryBean repositoryFactory = new MapJobRepositoryFactoryBean();
    repositoryFactory.afterPropertiesSet();
    JobRepository jobRepository = repositoryFactory.getObject();
    jobLauncher.setJobRepository(jobRepository);
    jobLauncher.setTaskExecutor(new SimpleAsyncTaskExecutor());
    jobLauncher.afterPropertiesSet();

    SimpleJob job = new SimpleJob("job");
    TaskletStep step = new TaskletStep("step");
    step.setTasklet(new Tasklet() {
      @Override
View Full Code Here

  }

  private JobLauncher createJobLauncher() throws Exception {
    SimpleJobLauncher jobLauncher = new SimpleJobLauncher();
    jobLauncher.setJobRepository(jobRepository);
    jobLauncher.afterPropertiesSet();
    return jobLauncher;
  }

  protected JobRepository createJobRepository() throws Exception {
    JobRepositoryFactoryBean factory = new JobRepositoryFactoryBean();
View Full Code Here

    JobExecution jobExecution = jobRepository.createJobExecution("job", new JobParameters());
    stepExecution = jobExecution.createStepExecution("step");
    jobRepository.add(stepExecution);
    SimpleJobLauncher jobLauncher = new SimpleJobLauncher();
    jobLauncher.setJobRepository(jobRepository);
    jobLauncher.afterPropertiesSet();
    step.setJobLauncher(jobLauncher);
  }

  /**
   * Test method for
View Full Code Here

  }

  private JobLauncher createJobLauncher() throws Exception {
    SimpleJobLauncher jobLauncher = new SimpleJobLauncher();
    jobLauncher.setJobRepository(jobRepository);
    jobLauncher.afterPropertiesSet();
    return jobLauncher;
  }

  protected JobRepository createJobRepository() throws Exception {
    JobRepositoryFactoryBean factory = createJobRepositoryFactoryBean();
View Full Code Here

  }

  private JobLauncher createJobLauncher() throws Exception {
    SimpleJobLauncher jobLauncher = new SimpleJobLauncher();
    jobLauncher.setJobRepository(getJobRepository());
    jobLauncher.afterPropertiesSet();
    return jobLauncher;
  }

  protected JobRepository createJobRepository() throws Exception {
    JobRepositoryFactoryBean factory = new JobRepositoryFactoryBean();
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.