Search in sources :

Example 6 with SimpleJobLauncher

use of org.springframework.batch.core.launch.support.SimpleJobLauncher in project tutorials by eugenp.

the class TaskletsConfig method jobLauncher.

@Bean
public JobLauncher jobLauncher() throws Exception {
    SimpleJobLauncher jobLauncher = new SimpleJobLauncher();
    jobLauncher.setJobRepository(jobRepository());
    return jobLauncher;
}
Also used : SimpleJobLauncher(org.springframework.batch.core.launch.support.SimpleJobLauncher) MapJobRepositoryFactoryBean(org.springframework.batch.core.repository.support.MapJobRepositoryFactoryBean) Bean(org.springframework.context.annotation.Bean)

Example 7 with SimpleJobLauncher

use of org.springframework.batch.core.launch.support.SimpleJobLauncher in project spring-boot by spring-projects.

the class BasicBatchConfigurer method createJobLauncher.

protected JobLauncher createJobLauncher() throws Exception {
    SimpleJobLauncher jobLauncher = new SimpleJobLauncher();
    jobLauncher.setJobRepository(getJobRepository());
    jobLauncher.afterPropertiesSet();
    return jobLauncher;
}
Also used : SimpleJobLauncher(org.springframework.batch.core.launch.support.SimpleJobLauncher)

Example 8 with SimpleJobLauncher

use of org.springframework.batch.core.launch.support.SimpleJobLauncher in project hub-fortify-ssc-integration-service by blackducksoftware.

the class BatchSchedulerConfig method jobLauncher.

/**
 * Create batch job launcher
 *
 * @return
 * @throws Exception
 */
@Bean
public JobLauncher jobLauncher() throws Exception {
    SimpleJobLauncher jobLauncher = new SimpleJobLauncher();
    jobLauncher.setJobRepository(jobRepository());
    return jobLauncher;
}
Also used : SimpleJobLauncher(org.springframework.batch.core.launch.support.SimpleJobLauncher) MapJobRepositoryFactoryBean(org.springframework.batch.core.repository.support.MapJobRepositoryFactoryBean) Bean(org.springframework.context.annotation.Bean)

Example 9 with SimpleJobLauncher

use of org.springframework.batch.core.launch.support.SimpleJobLauncher in project tutorials by eugenp.

the class SpringbatchPartitionConfig method getJobLauncher.

public JobLauncher getJobLauncher() throws Exception {
    SimpleJobLauncher jobLauncher = new SimpleJobLauncher();
    // SimpleJobLauncher's methods Throws Generic Exception,
    // it would have been better to have a specific one
    jobLauncher.setJobRepository(getJobRepository());
    jobLauncher.afterPropertiesSet();
    return jobLauncher;
}
Also used : SimpleJobLauncher(org.springframework.batch.core.launch.support.SimpleJobLauncher)

Aggregations

SimpleJobLauncher (org.springframework.batch.core.launch.support.SimpleJobLauncher)9 Bean (org.springframework.context.annotation.Bean)5 MapJobRepositoryFactoryBean (org.springframework.batch.core.repository.support.MapJobRepositoryFactoryBean)4 Test (org.junit.Test)1 ExitStatus (org.springframework.batch.core.ExitStatus)1 Job (org.springframework.batch.core.Job)1 JobExecution (org.springframework.batch.core.JobExecution)1 JobExplorerFactoryBean (org.springframework.batch.core.explore.support.JobExplorerFactoryBean)1 JobRepositoryFactoryBean (org.springframework.batch.core.repository.support.JobRepositoryFactoryBean)1