From e3f72a64f86cd7ebdb0aa60a3111a8624e9186da Mon Sep 17 00:00:00 2001 From: dsyer Date: Thu, 28 Feb 2008 15:10:13 +0000 Subject: [PATCH] OPEN - issue BATCH-398: That old stateful / stateless things again.... http://jira.springframework.org/browse/BATCH-398 Split up config for TaskExecutorLauncher a bit. Heading for a more rational approach based on a new application context per run. --- .../resources/adhoc-job-launcher-context.xml | 64 +++++++++++++++++++ .../src/main/resources/jobs/adhocLoopJob.xml | 51 --------------- .../src/main/resources/jobs/footballJob.xml | 15 ++++- .../src/main/resources/jobs/parallelJob.xml | 4 +- .../resources/simple-container-definition.xml | 24 +++++-- .../batch/sample/TaskExecutorLauncher.java | 2 +- 6 files changed, 96 insertions(+), 64 deletions(-) create mode 100644 spring-batch-samples/src/main/resources/adhoc-job-launcher-context.xml diff --git a/spring-batch-samples/src/main/resources/adhoc-job-launcher-context.xml b/spring-batch-samples/src/main/resources/adhoc-job-launcher-context.xml new file mode 100644 index 000000000..1a9196ad8 --- /dev/null +++ b/spring-batch-samples/src/main/resources/adhoc-job-launcher-context.xml @@ -0,0 +1,64 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/spring-batch-samples/src/main/resources/jobs/adhocLoopJob.xml b/spring-batch-samples/src/main/resources/jobs/adhocLoopJob.xml index d4b47c804..688c148a9 100644 --- a/spring-batch-samples/src/main/resources/jobs/adhocLoopJob.xml +++ b/spring-batch-samples/src/main/resources/jobs/adhocLoopJob.xml @@ -24,43 +24,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -86,18 +49,4 @@ - - - - - - - - - - - diff --git a/spring-batch-samples/src/main/resources/jobs/footballJob.xml b/spring-batch-samples/src/main/resources/jobs/footballJob.xml index d94281131..486ac9a28 100644 --- a/spring-batch-samples/src/main/resources/jobs/footballJob.xml +++ b/spring-batch-samples/src/main/resources/jobs/footballJob.xml @@ -122,12 +122,21 @@ - - + - + + + + + diff --git a/spring-batch-samples/src/main/resources/jobs/parallelJob.xml b/spring-batch-samples/src/main/resources/jobs/parallelJob.xml index 5c02503a8..02c30a428 100644 --- a/spring-batch-samples/src/main/resources/jobs/parallelJob.xml +++ b/spring-batch-samples/src/main/resources/jobs/parallelJob.xml @@ -138,12 +138,10 @@ - - + - diff --git a/spring-batch-samples/src/main/resources/simple-container-definition.xml b/spring-batch-samples/src/main/resources/simple-container-definition.xml index ff4ee38eb..2f8d99570 100644 --- a/spring-batch-samples/src/main/resources/simple-container-definition.xml +++ b/spring-batch-samples/src/main/resources/simple-container-definition.xml @@ -146,16 +146,28 @@ - + + - - + - + pointcut="execution( * org.springframework.batch.sample..InfiniteLoopTasklet+.execute(..))" + method="doBasicLogging" /> + + + + + diff --git a/spring-batch-samples/src/test/java/org/springframework/batch/sample/TaskExecutorLauncher.java b/spring-batch-samples/src/test/java/org/springframework/batch/sample/TaskExecutorLauncher.java index 39e632388..bdbe8b96a 100644 --- a/spring-batch-samples/src/test/java/org/springframework/batch/sample/TaskExecutorLauncher.java +++ b/spring-batch-samples/src/test/java/org/springframework/batch/sample/TaskExecutorLauncher.java @@ -38,7 +38,7 @@ public class TaskExecutorLauncher { // TaskExecutor. The adhocLoopJob has both, which is why it has to be // included in the paths above. final ApplicationContext parent = new ClassPathXmlApplicationContext( - "simple-container-definition.xml"); + "adhoc-job-launcher-context.xml"); new Thread(new Runnable() { public void run() {