diff --git a/spring-cloud-dataflow-server-core/src/main/java/org/springframework/cloud/dataflow/server/config/DataFlowTaskConfiguration.java b/spring-cloud-dataflow-server-core/src/main/java/org/springframework/cloud/dataflow/server/config/DataFlowTaskConfiguration.java index 8d5e600d09..5b2be1c25a 100644 --- a/spring-cloud-dataflow-server-core/src/main/java/org/springframework/cloud/dataflow/server/config/DataFlowTaskConfiguration.java +++ b/spring-cloud-dataflow-server-core/src/main/java/org/springframework/cloud/dataflow/server/config/DataFlowTaskConfiguration.java @@ -20,7 +20,7 @@ import javax.sql.DataSource; import org.springframework.batch.core.explore.JobExplorer; -import org.springframework.batch.core.launch.support.SimpleJobLauncher; +import org.springframework.batch.core.launch.support.TaskExecutorJobLauncher; import org.springframework.batch.core.repository.JobRepository; import org.springframework.batch.item.database.support.DataFieldMaxValueIncrementerFactory; import org.springframework.beans.BeanUtils; @@ -115,7 +115,7 @@ public JobService jobService(DataSource dataSource, PlatformTransactionManager p factoryBean.setEnvironment(environment); factoryBean.setDataSource(dataSource); factoryBean.setTransactionManager(platformTransactionManager); - factoryBean.setJobLauncher(new SimpleJobLauncher()); + factoryBean.setJobLauncher(new TaskExecutorJobLauncher()); factoryBean.setJobExplorer(jobExplorer); factoryBean.setJobRepository(jobRepository); factoryBean.setSerializer(new AllInOneExecutionContextSerializer()); diff --git a/spring-cloud-dataflow-server-core/src/test/java/org/springframework/cloud/dataflow/server/batch/AbstractSimpleJobServiceTests.java b/spring-cloud-dataflow-server-core/src/test/java/org/springframework/cloud/dataflow/server/batch/AbstractSimpleJobServiceTests.java index 0ed92681de..6102b4aac1 100644 --- a/spring-cloud-dataflow-server-core/src/test/java/org/springframework/cloud/dataflow/server/batch/AbstractSimpleJobServiceTests.java +++ b/spring-cloud-dataflow-server-core/src/test/java/org/springframework/cloud/dataflow/server/batch/AbstractSimpleJobServiceTests.java @@ -30,6 +30,7 @@ import org.junit.jupiter.api.Test; import org.springframework.batch.core.launch.JobExecutionNotRunningException; import org.springframework.batch.core.launch.NoSuchJobExecutionException; +import org.springframework.batch.core.launch.support.TaskExecutorJobLauncher; import org.testcontainers.containers.JdbcDatabaseContainer; import org.springframework.batch.core.BatchStatus; @@ -40,7 +41,6 @@ import org.springframework.batch.core.explore.JobExplorer; import org.springframework.batch.core.explore.support.JobExplorerFactoryBean; import org.springframework.batch.core.launch.NoSuchJobInstanceException; -import org.springframework.batch.core.launch.support.SimpleJobLauncher; import org.springframework.batch.core.repository.JobRepository; import org.springframework.batch.core.repository.dao.JdbcStepExecutionDao; import org.springframework.batch.core.repository.support.JobRepositoryFactoryBean; @@ -374,7 +374,7 @@ public JobService jobService(DataSource dataSource, factoryBean.setEnvironment(environment); factoryBean.setDataSource(dataSource); factoryBean.setTransactionManager(platformTransactionManager); - factoryBean.setJobLauncher(new SimpleJobLauncher()); + factoryBean.setJobLauncher(new TaskExecutorJobLauncher()); factoryBean.setJobExplorer(jobExplorer); factoryBean.setJobRepository(jobRepository); factoryBean.setSerializer(new AllInOneExecutionContextSerializer()); diff --git a/spring-cloud-dataflow-server-core/src/test/java/org/springframework/cloud/dataflow/server/service/impl/DefaultTaskDeleteServiceTests.java b/spring-cloud-dataflow-server-core/src/test/java/org/springframework/cloud/dataflow/server/service/impl/DefaultTaskDeleteServiceTests.java index 5cd7bb0fc5..a75774fbf4 100644 --- a/spring-cloud-dataflow-server-core/src/test/java/org/springframework/cloud/dataflow/server/service/impl/DefaultTaskDeleteServiceTests.java +++ b/spring-cloud-dataflow-server-core/src/test/java/org/springframework/cloud/dataflow/server/service/impl/DefaultTaskDeleteServiceTests.java @@ -32,7 +32,7 @@ import org.springframework.batch.core.JobParametersIncrementer; import org.springframework.batch.core.JobParametersValidator; import org.springframework.batch.core.launch.JobLauncher; -import org.springframework.batch.core.launch.support.SimpleJobLauncher; +import org.springframework.batch.core.launch.support.TaskExecutorJobLauncher; import org.springframework.batch.core.repository.JobRepository; import org.springframework.batch.test.JobLauncherTestUtils; import org.springframework.beans.factory.annotation.Autowired; @@ -185,7 +185,7 @@ public static class DefaultTaskDeleteServiceNoChunkTests extends DefaultTaskDele } JobLauncher jobLauncher(JobRepository jobRepository) { - SimpleJobLauncher launcher = new SimpleJobLauncher(); + TaskExecutorJobLauncher launcher = new TaskExecutorJobLauncher(); launcher.setJobRepository(jobRepository); launcher.setTaskExecutor(task -> { });