Package org.springframework.batch.core.repository

Examples of org.springframework.batch.core.repository.JobRepository


  private JobExecution execution;

  @Before
  public void init() throws Exception {
    JobRepository jobRepository = new MapJobRepositoryFactoryBean().getObject();
    job.setJobRepository(jobRepository);
    execution = jobRepository.createJobExecution("job", new JobParameters());
  }
View Full Code Here


  @Before
  public void init() throws Exception {
    this.context.register(BatchConfiguration.class);
    this.context.refresh();
    JobRepository jobRepository = this.context.getBean(JobRepository.class);
    this.jobLauncher = this.context.getBean(JobLauncher.class);
    this.jobs = new JobBuilderFactory(jobRepository);
    PlatformTransactionManager transactionManager = this.context
        .getBean(PlatformTransactionManager.class);
    this.steps = new StepBuilderFactory(jobRepository, transactionManager);
View Full Code Here

        "spring.batch.job.names:discreteRegisteredJob");
    this.context.register(NamedJobConfigurationWithRegisteredJob.class,
        EmbeddedDataSourceConfiguration.class, BatchAutoConfiguration.class,
        PropertyPlaceholderAutoConfiguration.class);
    this.context.refresh();
    JobRepository repository = this.context.getBean(JobRepository.class);
    assertNotNull(this.context.getBean(JobLauncher.class));
    this.context.getBean(JobLauncherCommandLineRunner.class).run();
    assertNotNull(repository.getLastJobExecution("discreteRegisteredJob",
        new JobParameters()));
  }
View Full Code Here

TOP

Related Classes of org.springframework.batch.core.repository.JobRepository

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.