diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/launch/package.html b/spring-batch-core/src/main/java/org/springframework/batch/core/launch/package.html index 1bdb94690..b302ca258 100644 --- a/spring-batch-core/src/main/java/org/springframework/batch/core/launch/package.html +++ b/spring-batch-core/src/main/java/org/springframework/batch/core/launch/package.html @@ -1,7 +1,7 @@

-Specific implementations of facade concerns. +Interfaces and simple implementations of launch concerns.

diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/launch/support/CommandLineJobRunner.java b/spring-batch-core/src/main/java/org/springframework/batch/core/launch/support/CommandLineJobRunner.java index ef195ea12..9ef8ab4ed 100644 --- a/spring-batch-core/src/main/java/org/springframework/batch/core/launch/support/CommandLineJobRunner.java +++ b/spring-batch-core/src/main/java/org/springframework/batch/core/launch/support/CommandLineJobRunner.java @@ -24,8 +24,8 @@ import org.springframework.batch.core.JobExecution; import org.springframework.batch.core.JobParameters; import org.springframework.batch.core.configuration.JobLocator; import org.springframework.batch.core.launch.JobLauncher; -import org.springframework.batch.core.runtime.DefaultJobParametersFactory; -import org.springframework.batch.core.runtime.JobParametersFactory; +import org.springframework.batch.core.support.DefaultJobParametersConverter; +import org.springframework.batch.core.support.JobParametersConverter; import org.springframework.batch.repeat.ExitStatus; import org.springframework.beans.factory.BeanDefinitionStoreException; import org.springframework.beans.factory.config.AutowireCapableBeanFactory; @@ -127,7 +127,7 @@ public class CommandLineJobRunner { private SystemExiter systemExiter = new JvmSystemExiter(); - private JobParametersFactory jobParametersFactory = new DefaultJobParametersFactory(); + private JobParametersConverter jobParametersConverter = new DefaultJobParametersConverter(); /** * Injection setter for the {@link JobLauncher}. @@ -190,7 +190,7 @@ public class CommandLineJobRunner { job = (Job) context.getBean(jobName); } - JobParameters jobParameters = jobParametersFactory + JobParameters jobParameters = jobParametersConverter .getJobParameters(StringUtils .splitArrayElementsIntoProperties(parameters, "=")); diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/launch/support/ScheduledJobParametersFactory.java b/spring-batch-core/src/main/java/org/springframework/batch/core/launch/support/ScheduledJobParametersFactory.java index 2768c0abd..5b2e8a28c 100644 --- a/spring-batch-core/src/main/java/org/springframework/batch/core/launch/support/ScheduledJobParametersFactory.java +++ b/spring-batch-core/src/main/java/org/springframework/batch/core/launch/support/ScheduledJobParametersFactory.java @@ -26,13 +26,13 @@ import java.util.Map.Entry; import org.springframework.batch.core.JobParameters; import org.springframework.batch.core.JobParametersBuilder; -import org.springframework.batch.core.runtime.JobParametersFactory; +import org.springframework.batch.core.support.JobParametersConverter; /** * @author Lucas Ward * */ -public class ScheduledJobParametersFactory implements JobParametersFactory { +public class ScheduledJobParametersFactory implements JobParametersConverter { public static String SCHEDULE_DATE_KEY = "schedule.date"; @@ -75,7 +75,7 @@ public class ScheduledJobParametersFactory implements JobParametersFactory { * Convert schedule date to Date, and assume all other parameters can be * represented by their default string value. * - * @see org.springframework.batch.core.runtime.JobParametersFactory#getProperties(org.springframework.batch.core.JobParameters) + * @see org.springframework.batch.core.support.JobParametersConverter#getProperties(org.springframework.batch.core.JobParameters) */ public Properties getProperties(JobParameters params) { diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/launch/support/SimpleExportedJobLauncher.java b/spring-batch-core/src/main/java/org/springframework/batch/core/launch/support/SimpleExportedJobLauncher.java index 66adfb3e4..24a2ce1d3 100644 --- a/spring-batch-core/src/main/java/org/springframework/batch/core/launch/support/SimpleExportedJobLauncher.java +++ b/spring-batch-core/src/main/java/org/springframework/batch/core/launch/support/SimpleExportedJobLauncher.java @@ -29,8 +29,8 @@ import org.springframework.batch.core.launch.JobLauncher; import org.springframework.batch.core.repository.JobRestartException; import org.springframework.batch.core.repository.JobExecutionAlreadyRunningException; import org.springframework.batch.core.repository.NoSuchJobException; -import org.springframework.batch.core.runtime.DefaultJobParametersFactory; -import org.springframework.batch.core.runtime.JobParametersFactory; +import org.springframework.batch.core.support.DefaultJobParametersConverter; +import org.springframework.batch.core.support.JobParametersConverter; import org.springframework.batch.support.PropertiesConverter; import org.springframework.beans.factory.InitializingBean; import org.springframework.util.Assert; @@ -47,7 +47,7 @@ public class SimpleExportedJobLauncher implements ExportedJobLauncher, Initializ private Map registry = new HashMap(); - private JobParametersFactory jobParametersFactory = new DefaultJobParametersFactory(); + private JobParametersConverter jobParametersConverter = new DefaultJobParametersConverter(); /* (non-Javadoc) * @see org.springframework.beans.factory.InitializingBean#afterPropertiesSet() @@ -75,10 +75,10 @@ public class SimpleExportedJobLauncher implements ExportedJobLauncher, Initializ /** * Public setter for the JobParametersFactory. - * @param jobParametersFactory the jobParametersFactory to set + * @param jobParametersConverter the jobParametersFactory to set */ - public void setJobParametersFactory(JobParametersFactory jobParametersFactory) { - this.jobParametersFactory = jobParametersFactory; + public void setJobParametersFactory(JobParametersConverter jobParametersConverter) { + this.jobParametersConverter = jobParametersConverter; } /* @@ -153,7 +153,7 @@ public class SimpleExportedJobLauncher implements ExportedJobLauncher, Initializ JobParameters jobParameters = new JobParameters(); if (params != null) { - jobParameters = jobParametersFactory.getJobParameters(PropertiesConverter.stringToProperties(params)); + jobParameters = jobParametersConverter.getJobParameters(PropertiesConverter.stringToProperties(params)); } JobExecution execution; diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/launch/SimpleJobLauncher.java b/spring-batch-core/src/main/java/org/springframework/batch/core/launch/support/SimpleJobLauncher.java similarity index 97% rename from spring-batch-core/src/main/java/org/springframework/batch/core/launch/SimpleJobLauncher.java rename to spring-batch-core/src/main/java/org/springframework/batch/core/launch/support/SimpleJobLauncher.java index 38b550a7c..8b6a9bdeb 100644 --- a/spring-batch-core/src/main/java/org/springframework/batch/core/launch/SimpleJobLauncher.java +++ b/spring-batch-core/src/main/java/org/springframework/batch/core/launch/support/SimpleJobLauncher.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.springframework.batch.core.launch; +package org.springframework.batch.core.launch.support; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; @@ -21,6 +21,7 @@ import org.springframework.batch.core.Job; import org.springframework.batch.core.JobExecution; import org.springframework.batch.core.JobInstance; import org.springframework.batch.core.JobParameters; +import org.springframework.batch.core.launch.JobLauncher; import org.springframework.batch.core.repository.JobRestartException; import org.springframework.batch.core.repository.JobExecutionAlreadyRunningException; import org.springframework.batch.core.repository.JobRepository; diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/launch/support/package.html b/spring-batch-core/src/main/java/org/springframework/batch/core/launch/support/package.html index 7f6a1eae1..0401779d5 100644 --- a/spring-batch-core/src/main/java/org/springframework/batch/core/launch/support/package.html +++ b/spring-batch-core/src/main/java/org/springframework/batch/core/launch/support/package.html @@ -1,7 +1,7 @@

-Support classes for use in bootstrap implementations or configurations. +Support classes for use in bootstrap and launch implementations or configurations.

diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/listener/package.html b/spring-batch-core/src/main/java/org/springframework/batch/core/listener/package.html new file mode 100644 index 000000000..c8f398aa3 --- /dev/null +++ b/spring-batch-core/src/main/java/org/springframework/batch/core/listener/package.html @@ -0,0 +1,7 @@ + + +

+Generic implementations of core batch listener interfaces. +

+ + diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/runtime/package.html b/spring-batch-core/src/main/java/org/springframework/batch/core/runtime/package.html deleted file mode 100644 index 5128279b8..000000000 --- a/spring-batch-core/src/main/java/org/springframework/batch/core/runtime/package.html +++ /dev/null @@ -1,7 +0,0 @@ - - -

-Interfaces and generic implementations of runtime concerns. -

- - diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/runtime/ExitStatusExceptionClassifier.java b/spring-batch-core/src/main/java/org/springframework/batch/core/step/ExitStatusExceptionClassifier.java similarity index 96% rename from spring-batch-core/src/main/java/org/springframework/batch/core/runtime/ExitStatusExceptionClassifier.java rename to spring-batch-core/src/main/java/org/springframework/batch/core/step/ExitStatusExceptionClassifier.java index ef6241087..ba9c9d592 100644 --- a/spring-batch-core/src/main/java/org/springframework/batch/core/runtime/ExitStatusExceptionClassifier.java +++ b/spring-batch-core/src/main/java/org/springframework/batch/core/step/ExitStatusExceptionClassifier.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.springframework.batch.core.runtime; +package org.springframework.batch.core.step; import org.springframework.batch.repeat.ExitStatus; import org.springframework.batch.support.ExceptionClassifier; diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/step/ItemOrientedStep.java b/spring-batch-core/src/main/java/org/springframework/batch/core/step/ItemOrientedStep.java index 388d8cd27..61e749ba6 100644 --- a/spring-batch-core/src/main/java/org/springframework/batch/core/step/ItemOrientedStep.java +++ b/spring-batch-core/src/main/java/org/springframework/batch/core/step/ItemOrientedStep.java @@ -27,7 +27,6 @@ import org.springframework.batch.core.StepListener; import org.springframework.batch.core.UnexpectedJobExecutionException; import org.springframework.batch.core.listener.CompositeStepListener; import org.springframework.batch.core.repository.JobRepository; -import org.springframework.batch.core.runtime.ExitStatusExceptionClassifier; import org.springframework.batch.core.tasklet.Tasklet; import org.springframework.batch.item.ItemReader; import org.springframework.batch.item.ItemStream; diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/step/SimpleExitStatusExceptionClassifier.java b/spring-batch-core/src/main/java/org/springframework/batch/core/step/SimpleExitStatusExceptionClassifier.java index c64fede1e..1347d2d9a 100644 --- a/spring-batch-core/src/main/java/org/springframework/batch/core/step/SimpleExitStatusExceptionClassifier.java +++ b/spring-batch-core/src/main/java/org/springframework/batch/core/step/SimpleExitStatusExceptionClassifier.java @@ -21,7 +21,6 @@ import java.io.StringWriter; import org.springframework.batch.core.JobInterruptedException; import org.springframework.batch.core.launch.support.ExitCodeMapper; import org.springframework.batch.core.repository.NoSuchJobException; -import org.springframework.batch.core.runtime.ExitStatusExceptionClassifier; import org.springframework.batch.repeat.ExitStatus; /** diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/runtime/DefaultJobParametersFactory.java b/spring-batch-core/src/main/java/org/springframework/batch/core/support/DefaultJobParametersConverter.java similarity index 91% rename from spring-batch-core/src/main/java/org/springframework/batch/core/runtime/DefaultJobParametersFactory.java rename to spring-batch-core/src/main/java/org/springframework/batch/core/support/DefaultJobParametersConverter.java index 74c86239e..8ee93c0d3 100644 --- a/spring-batch-core/src/main/java/org/springframework/batch/core/runtime/DefaultJobParametersFactory.java +++ b/spring-batch-core/src/main/java/org/springframework/batch/core/support/DefaultJobParametersConverter.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.springframework.batch.core.runtime; +package org.springframework.batch.core.support; import java.text.DateFormat; import java.text.DecimalFormat; @@ -31,7 +31,7 @@ import org.springframework.batch.core.JobParametersBuilder; import org.springframework.util.StringUtils; /** - * Factory for {@link JobParameters} instances using a simple naming convention + * Converter for {@link JobParameters} instances using a simple naming convention * for property keys. Key names ending with "(<type>)" where type is one * of string, date, long are converted to the corresponding type. The default * type is string. E.g. @@ -47,7 +47,7 @@ import org.springframework.util.StringUtils; * @author Dave Syer * */ -public class DefaultJobParametersFactory implements JobParametersFactory { +public class DefaultJobParametersConverter implements JobParametersConverter { public static String DATE_TYPE = "(date)"; @@ -66,7 +66,7 @@ public class DefaultJobParametersFactory implements JobParametersFactory { * @throws IllegalArgumentException if a number or date is passed in that * cannot be parsed, or cast to the correct type. * - * @see org.springframework.batch.core.runtime.JobParametersFactory#getJobParameters(java.util.Properties) + * @see org.springframework.batch.core.support.JobParametersConverter#getJobParameters(java.util.Properties) */ public JobParameters getJobParameters(Properties props) { @@ -124,7 +124,7 @@ public class DefaultJobParametersFactory implements JobParametersFactory { * Use the same suffixes to create properties (omitting the string suffix * because it is the default). * - * @see org.springframework.batch.core.runtime.JobParametersFactory#getProperties(org.springframework.batch.core.JobParameters) + * @see org.springframework.batch.core.support.JobParametersConverter#getProperties(org.springframework.batch.core.JobParameters) */ public Properties getProperties(JobParameters params) { diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/runtime/JobParametersFactory.java b/spring-batch-core/src/main/java/org/springframework/batch/core/support/JobParametersConverter.java similarity index 57% rename from spring-batch-core/src/main/java/org/springframework/batch/core/runtime/JobParametersFactory.java rename to spring-batch-core/src/main/java/org/springframework/batch/core/support/JobParametersConverter.java index 848b79b55..01a091b49 100644 --- a/spring-batch-core/src/main/java/org/springframework/batch/core/runtime/JobParametersFactory.java +++ b/spring-batch-core/src/main/java/org/springframework/batch/core/support/JobParametersConverter.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.batch.core.runtime; +package org.springframework.batch.core.support; import java.util.Properties; @@ -22,34 +22,30 @@ import org.springframework.batch.core.JobParameters; import org.springframework.batch.core.JobParametersBuilder; /** - * A factory for {@link JobParameters} instances. A job can be - * executed with many possible runtime parameters, which identify the instance - * of the job. This factory allows job identifiers to be created with different - * properties according to the {@link JobParameters} strategy required. For - * example some projects or jobs need a schedule date as part of the - * {@link JobParameters} and some do not (e.g. for an ad-hoc execution a simple - * label might be enough). + * A factory for {@link JobParameters} instances. A job can be executed with + * many possible runtime parameters, which identify the instance of the job. + * This converter allows job parameters to be to and from Properties. * * @author Dave Syer * * @see JobParametersBuilder * */ -public interface JobParametersFactory { +public interface JobParametersConverter { /** - * Get a new {@link JobParameters} instance. If given null, or an empty + * Get a new {@link JobParameters} instance. If given null, or an empty * properties, an empty JobParameters will be returned. * - * @param properties - * the runtime parameters in the form of String literals. - * @return a {@link JobParameters} properties converted to the correct types. + * @param properties the runtime parameters in the form of String literals. + * @return a {@link JobParameters} properties converted to the correct + * types. */ public JobParameters getJobParameters(Properties properties); /** - * The inverse operation: get a {@link Properties} instance. If given - * null or empty JobParameters, an empty Properties should be returned. + * The inverse operation: get a {@link Properties} instance. If given null + * or empty JobParameters, an empty Properties should be returned. * * @param params * @return a representation of the parameters as properties diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/resource/StepExecutionProxyResource.java b/spring-batch-core/src/main/java/org/springframework/batch/core/support/StepExecutionResourceProxy.java similarity index 90% rename from spring-batch-core/src/main/java/org/springframework/batch/core/resource/StepExecutionProxyResource.java rename to spring-batch-core/src/main/java/org/springframework/batch/core/support/StepExecutionResourceProxy.java index 585cec73d..3689cae67 100644 --- a/spring-batch-core/src/main/java/org/springframework/batch/core/resource/StepExecutionProxyResource.java +++ b/spring-batch-core/src/main/java/org/springframework/batch/core/support/StepExecutionResourceProxy.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.batch.core.resource; +package org.springframework.batch.core.support; import java.io.File; import java.io.IOException; @@ -29,8 +29,6 @@ import org.springframework.batch.core.JobParameters; import org.springframework.batch.core.StepExecution; import org.springframework.batch.core.StepListener; import org.springframework.batch.core.listener.StepListenerSupport; -import org.springframework.batch.core.runtime.DefaultJobParametersFactory; -import org.springframework.batch.core.runtime.JobParametersFactory; import org.springframework.context.ResourceLoaderAware; import org.springframework.core.io.FileSystemResourceLoader; import org.springframework.core.io.Resource; @@ -61,11 +59,12 @@ import org.springframework.util.StringUtils; * * Note that the default pattern does not start with a separator. Because of the * implementation of the Spring Core Resource abstractions, it would need to - * start with a double forward slash "//" to resolve to an absolute directory.
+ * start with a double forward slash "//" to resolve to an absolute directory + * (or else use a full URL with the file: prefix).
* * To use this resource it must be initialised with a {@link StepExecution}. * The best way to do that is to register it as a listener in the step that is - * going to need it. It is to enable this usage that the resource implements + * going to need it. For this reason the resource implements * {@link StepListener}. * * @author Tomas Slanina @@ -74,7 +73,7 @@ import org.springframework.util.StringUtils; * * @see Resource */ -public class StepExecutionProxyResource extends StepListenerSupport implements Resource, ResourceLoaderAware, +public class StepExecutionResourceProxy extends StepListenerSupport implements Resource, ResourceLoaderAware, StepListener { private static final String JOB_NAME_PATTERN = "%JOB_NAME%"; @@ -85,7 +84,7 @@ public class StepExecutionProxyResource extends StepListenerSupport implements R private String filePattern = DEFAULT_PATTERN; - private JobParametersFactory jobParametersFactory = new DefaultJobParametersFactory(); + private JobParametersConverter jobParametersConverter = new DefaultJobParametersConverter(); private ResourceLoader resourceLoader = new FileSystemResourceLoader(); @@ -197,13 +196,13 @@ public class StepExecutionProxyResource extends StepListenerSupport implements R } /** - * Public setter for the {@link JobParametersFactory} used to translate + * Public setter for the {@link JobParametersConverter} used to translate * {@link JobParameters} into {@link Properties}. Defaults to a - * {@link DefaultJobParametersFactory}. - * @param jobParametersFactory the {@link JobParametersFactory} to set + * {@link DefaultJobParametersConverter}. + * @param jobParametersConverter the {@link JobParametersConverter} to set */ - public void setJobParametersFactory(JobParametersFactory jobParametersFactory) { - this.jobParametersFactory = jobParametersFactory; + public void setJobParametersFactory(JobParametersConverter jobParametersConverter) { + this.jobParametersConverter = jobParametersConverter; } /** @@ -281,7 +280,7 @@ public class StepExecutionProxyResource extends StepListenerSupport implements R public void beforeStep(StepExecution execution) { String stepName = execution.getStepName(); String jobName = execution.getJobExecution().getJobInstance().getJobName(); - Properties properties = jobParametersFactory.getProperties(execution.getJobExecution().getJobInstance() + Properties properties = jobParametersConverter.getProperties(execution.getJobExecution().getJobInstance() .getJobParameters()); delegate = resourceLoader.getResource(createFileName(jobName, stepName, properties)); } diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/support/package.html b/spring-batch-core/src/main/java/org/springframework/batch/core/support/package.html new file mode 100644 index 000000000..72f5b5cf6 --- /dev/null +++ b/spring-batch-core/src/main/java/org/springframework/batch/core/support/package.html @@ -0,0 +1,6 @@ + + +

Support classes for implementations of the batch APIs. Things +like converters and resource location and management concerns.

+ + diff --git a/spring-batch-core/src/test/java/org/springframework/batch/core/BatchStatusTests.java b/spring-batch-core/src/test/java/org/springframework/batch/core/BatchStatusTests.java index 50b504536..2e7345dc4 100644 --- a/spring-batch-core/src/test/java/org/springframework/batch/core/BatchStatusTests.java +++ b/spring-batch-core/src/test/java/org/springframework/batch/core/BatchStatusTests.java @@ -20,8 +20,6 @@ import java.io.ByteArrayOutputStream; import java.io.ObjectInputStream; import java.io.ObjectOutputStream; -import org.springframework.batch.core.BatchStatus; - import junit.framework.TestCase; /** diff --git a/spring-batch-core/src/test/java/org/springframework/batch/core/EntityTests.java b/spring-batch-core/src/test/java/org/springframework/batch/core/EntityTests.java index 30f412d0f..e5dc60ec5 100644 --- a/spring-batch-core/src/test/java/org/springframework/batch/core/EntityTests.java +++ b/spring-batch-core/src/test/java/org/springframework/batch/core/EntityTests.java @@ -15,8 +15,6 @@ */ package org.springframework.batch.core; -import org.springframework.batch.core.Entity; - import junit.framework.TestCase; /** diff --git a/spring-batch-core/src/test/java/org/springframework/batch/core/JobExecutionExceptionTests.java b/spring-batch-core/src/test/java/org/springframework/batch/core/JobExecutionExceptionTests.java index 45fff1eb8..c296ac501 100644 --- a/spring-batch-core/src/test/java/org/springframework/batch/core/JobExecutionExceptionTests.java +++ b/spring-batch-core/src/test/java/org/springframework/batch/core/JobExecutionExceptionTests.java @@ -15,7 +15,6 @@ */ package org.springframework.batch.core; -import org.springframework.batch.core.JobExecutionException; /** * @author Dave Syer diff --git a/spring-batch-core/src/test/java/org/springframework/batch/core/JobExecutionTests.java b/spring-batch-core/src/test/java/org/springframework/batch/core/JobExecutionTests.java index fbf043c3f..07af35e22 100644 --- a/spring-batch-core/src/test/java/org/springframework/batch/core/JobExecutionTests.java +++ b/spring-batch-core/src/test/java/org/springframework/batch/core/JobExecutionTests.java @@ -19,11 +19,8 @@ import java.util.Date; import junit.framework.TestCase; -import org.springframework.batch.core.BatchStatus; -import org.springframework.batch.core.JobExecution; -import org.springframework.batch.core.JobInstance; -import org.springframework.batch.core.JobParameters; -import org.springframework.batch.core.StepExecution; +import org.springframework.batch.core.job.JobSupport; +import org.springframework.batch.core.step.StepSupport; import org.springframework.batch.repeat.ExitStatus; /** diff --git a/spring-batch-core/src/test/java/org/springframework/batch/core/JobInstanceTests.java b/spring-batch-core/src/test/java/org/springframework/batch/core/JobInstanceTests.java index 937444953..234de669e 100644 --- a/spring-batch-core/src/test/java/org/springframework/batch/core/JobInstanceTests.java +++ b/spring-batch-core/src/test/java/org/springframework/batch/core/JobInstanceTests.java @@ -15,11 +15,10 @@ */ package org.springframework.batch.core; -import org.springframework.batch.core.JobInstance; -import org.springframework.batch.core.JobParameters; - import junit.framework.TestCase; +import org.springframework.batch.core.job.JobSupport; + /** * @author dsyer * diff --git a/spring-batch-core/src/test/java/org/springframework/batch/core/JobInterruptedExceptionTests.java b/spring-batch-core/src/test/java/org/springframework/batch/core/JobInterruptedExceptionTests.java index 02ecfe8eb..98654693a 100644 --- a/spring-batch-core/src/test/java/org/springframework/batch/core/JobInterruptedExceptionTests.java +++ b/spring-batch-core/src/test/java/org/springframework/batch/core/JobInterruptedExceptionTests.java @@ -15,7 +15,6 @@ */ package org.springframework.batch.core; -import org.springframework.batch.core.JobInterruptedException; /** * @author Dave Syer diff --git a/spring-batch-core/src/test/java/org/springframework/batch/core/JobParametersBuilderTests.java b/spring-batch-core/src/test/java/org/springframework/batch/core/JobParametersBuilderTests.java index f21eee6c8..1f604b10e 100644 --- a/spring-batch-core/src/test/java/org/springframework/batch/core/JobParametersBuilderTests.java +++ b/spring-batch-core/src/test/java/org/springframework/batch/core/JobParametersBuilderTests.java @@ -6,9 +6,6 @@ package org.springframework.batch.core; import java.util.Date; import java.util.Iterator; -import org.springframework.batch.core.JobParameters; -import org.springframework.batch.core.JobParametersBuilder; - import junit.framework.TestCase; /** diff --git a/spring-batch-core/src/test/java/org/springframework/batch/core/JobParametersTests.java b/spring-batch-core/src/test/java/org/springframework/batch/core/JobParametersTests.java index 77c77d148..336159db9 100644 --- a/spring-batch-core/src/test/java/org/springframework/batch/core/JobParametersTests.java +++ b/spring-batch-core/src/test/java/org/springframework/batch/core/JobParametersTests.java @@ -9,8 +9,6 @@ import java.util.Iterator; import java.util.Map; import java.util.Map.Entry; -import org.springframework.batch.core.JobParameters; - import junit.framework.TestCase; /** diff --git a/spring-batch-core/src/test/java/org/springframework/batch/core/JobSupport.java b/spring-batch-core/src/test/java/org/springframework/batch/core/JobSupport.java deleted file mode 100644 index 4c25f9d9e..000000000 --- a/spring-batch-core/src/test/java/org/springframework/batch/core/JobSupport.java +++ /dev/null @@ -1,145 +0,0 @@ -/* - * Copyright 2006-2007 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.springframework.batch.core; - -import java.util.ArrayList; -import java.util.List; - -import org.springframework.batch.core.Job; -import org.springframework.batch.core.JobExecution; -import org.springframework.batch.core.Step; -import org.springframework.beans.factory.BeanNameAware; -import org.springframework.util.ClassUtils; - -/** - * Batch domain object representing a job. Job is an explicit abstraction - * representing the configuration of a job specified by a developer. It should - * be noted that restart policy is applied to the job as a whole and not to a - * step. - * - * @author Lucas Ward - * @author Dave Syer - */ -public class JobSupport implements BeanNameAware, Job { - - private List steps = new ArrayList(); - - private String name; - - private boolean restartable = false; - - private int startLimit = Integer.MAX_VALUE; - - /** - * Default constructor. - */ - public JobSupport() { - super(); - } - - /** - * Convenience constructor to immediately add name (which is mandatory but - * not final). - * - * @param name - */ - public JobSupport(String name) { - super(); - this.name = name; - } - - /** - * Set the name property if it is not already set. Because of the order of - * the callbacks in a Spring container the name property will be set first - * if it is present. Care is needed with bean definition inheritance - if a - * parent bean has a name, then its children need an explicit name as well, - * otherwise they will not be unique. - * - * @see org.springframework.beans.factory.BeanNameAware#setBeanName(java.lang.String) - */ - public void setBeanName(String name) { - if (this.name == null) { - this.name = name; - } - } - - /** - * Set the name property. Always overrides the default value if this object - * is a Spring bean. - * - * @see #setBeanName(java.lang.String) - */ - public void setName(String name) { - this.name = name; - } - - /* (non-Javadoc) - * @see org.springframework.batch.core.domain.IJob#getName() - */ - public String getName() { - return name; - } - - /* (non-Javadoc) - * @see org.springframework.batch.core.domain.IJob#getSteps() - */ - public List getSteps() { - return steps; - } - - public void setSteps(List steps) { - this.steps.clear(); - this.steps.addAll(steps); - } - - public void addStep(Step step) { - this.steps.add(step); - } - - /* (non-Javadoc) - * @see org.springframework.batch.core.domain.IJob#getStartLimit() - */ - public int getStartLimit() { - return startLimit; - } - - public void setStartLimit(int startLimit) { - this.startLimit = startLimit; - } - - public void setRestartable(boolean restartable) { - this.restartable = restartable; - } - - /* (non-Javadoc) - * @see org.springframework.batch.core.domain.IJob#isRestartable() - */ - public boolean isRestartable() { - return restartable; - } - - /* (non-Javadoc) - * @see org.springframework.batch.core.domain.Job#run(org.springframework.batch.core.domain.JobExecution) - */ - public void execute(JobExecution execution) throws UnexpectedJobExecutionException { - throw new UnsupportedOperationException("JobSupport does not provide an implementation of run(). Use a smarter subclass."); - } - - public String toString() { - return ClassUtils.getShortName(getClass()) + ": [name=" + name + "]"; - } -} diff --git a/spring-batch-core/src/test/java/org/springframework/batch/core/SpringBeanJobTests.java b/spring-batch-core/src/test/java/org/springframework/batch/core/SpringBeanJobTests.java index d819f2fcb..5f9e242bb 100644 --- a/spring-batch-core/src/test/java/org/springframework/batch/core/SpringBeanJobTests.java +++ b/spring-batch-core/src/test/java/org/springframework/batch/core/SpringBeanJobTests.java @@ -18,6 +18,7 @@ package org.springframework.batch.core; import junit.framework.TestCase; +import org.springframework.batch.core.job.JobSupport; import org.springframework.beans.factory.config.ConstructorArgumentValues; import org.springframework.beans.factory.support.ChildBeanDefinition; import org.springframework.beans.factory.support.RootBeanDefinition; diff --git a/spring-batch-core/src/test/java/org/springframework/batch/core/StepContributionTests.java b/spring-batch-core/src/test/java/org/springframework/batch/core/StepContributionTests.java index 93eb13e33..0c15f7128 100644 --- a/spring-batch-core/src/test/java/org/springframework/batch/core/StepContributionTests.java +++ b/spring-batch-core/src/test/java/org/springframework/batch/core/StepContributionTests.java @@ -17,8 +17,6 @@ package org.springframework.batch.core; import junit.framework.TestCase; -import org.springframework.batch.core.StepContribution; -import org.springframework.batch.core.StepExecution; import org.springframework.batch.item.ExecutionContext; /** diff --git a/spring-batch-core/src/test/java/org/springframework/batch/core/StepExecutionTests.java b/spring-batch-core/src/test/java/org/springframework/batch/core/StepExecutionTests.java index fcb42a994..661cfbf8b 100644 --- a/spring-batch-core/src/test/java/org/springframework/batch/core/StepExecutionTests.java +++ b/spring-batch-core/src/test/java/org/springframework/batch/core/StepExecutionTests.java @@ -21,14 +21,8 @@ import java.util.Set; import junit.framework.TestCase; -import org.springframework.batch.core.BatchStatus; -import org.springframework.batch.core.Entity; -import org.springframework.batch.core.JobExecution; -import org.springframework.batch.core.JobInstance; -import org.springframework.batch.core.JobParameters; -import org.springframework.batch.core.Step; -import org.springframework.batch.core.StepContribution; -import org.springframework.batch.core.StepExecution; +import org.springframework.batch.core.job.JobSupport; +import org.springframework.batch.core.step.StepSupport; import org.springframework.batch.item.ExecutionContext; import org.springframework.batch.repeat.ExitStatus; import org.springframework.batch.support.PropertiesConverter; diff --git a/spring-batch-core/src/test/java/org/springframework/batch/core/StepSupport.java b/spring-batch-core/src/test/java/org/springframework/batch/core/StepSupport.java deleted file mode 100644 index 08760978e..000000000 --- a/spring-batch-core/src/test/java/org/springframework/batch/core/StepSupport.java +++ /dev/null @@ -1,116 +0,0 @@ -/* - * Copyright 2006-2007 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.springframework.batch.core; - -import org.springframework.batch.core.JobInterruptedException; -import org.springframework.batch.core.Step; -import org.springframework.batch.core.StepExecution; -import org.springframework.beans.factory.BeanNameAware; - -/** - * Basic no-op support implementation for use as base class for {@link Step}. Implements {@link BeanNameAware} so that - * if no name is provided explicitly it will be inferred from the bean definition in Spring configuration. - * - * @author Dave Syer - * - */ -public class StepSupport implements Step, BeanNameAware { - - private String name; - - private int startLimit = Integer.MAX_VALUE; - - private boolean allowStartIfComplete; - - /** - * Default constructor for {@link StepSupport}. - */ - public StepSupport() { - super(); - } - - /** - * @param string - */ - public StepSupport(String string) { - super(); - this.name = string; - } - - public String getName() { - return this.name; - } - - /** - * Set the name property if it is not already set. Because of the order of the callbacks in a Spring container the - * name property will be set first if it is present. Care is needed with bean definition inheritance - if a parent - * bean has a name, then its children need an explicit name as well, otherwise they will not be unique. - * - * @see org.springframework.beans.factory.BeanNameAware#setBeanName(java.lang.String) - */ - public void setBeanName(String name) { - if (this.name == null) { - this.name = name; - } - } - - /** - * Set the name property. Always overrides the default value if this object is a Spring bean. - * - * @see #setBeanName(java.lang.String) - */ - public void setName(String name) { - this.name = name; - } - - public int getStartLimit() { - return this.startLimit; - } - - /** - * Public setter for the startLimit. - * - * @param startLimit the startLimit to set - */ - public void setStartLimit(int startLimit) { - this.startLimit = startLimit; - } - - public boolean isAllowStartIfComplete() { - return this.allowStartIfComplete; - } - - /** - * Public setter for the shouldAllowStartIfComplete. - * - * @param allowStartIfComplete the shouldAllowStartIfComplete to set - */ - public void setAllowStartIfComplete(boolean allowStartIfComplete) { - this.allowStartIfComplete = allowStartIfComplete; - } - - /** - * Not supported but provided so that tests can easily create a step. - * - * @throws UnsupportedOperationException always - * - * @see org.springframework.batch.core.Step#execute(org.springframework.batch.core.StepExecution) - */ - public void execute(StepExecution stepExecution) throws JobInterruptedException, UnexpectedJobExecutionException { - throw new UnsupportedOperationException( - "Cannot process a StepExecution. Use a smarter subclass of StepSupport."); - } -} diff --git a/spring-batch-core/src/test/java/org/springframework/batch/core/launch/SimpleJobLauncherTests.java b/spring-batch-core/src/test/java/org/springframework/batch/core/launch/SimpleJobLauncherTests.java index 0514febd6..dce78fde5 100644 --- a/spring-batch-core/src/test/java/org/springframework/batch/core/launch/SimpleJobLauncherTests.java +++ b/spring-batch-core/src/test/java/org/springframework/batch/core/launch/SimpleJobLauncherTests.java @@ -26,7 +26,7 @@ import org.springframework.batch.core.Job; import org.springframework.batch.core.JobExecution; import org.springframework.batch.core.JobParameters; import org.springframework.batch.core.job.JobSupport; -import org.springframework.batch.core.launch.SimpleJobLauncher; +import org.springframework.batch.core.launch.support.SimpleJobLauncher; import org.springframework.batch.core.repository.JobRepository; import org.springframework.batch.repeat.ExitStatus; import org.springframework.core.task.TaskExecutor; diff --git a/spring-batch-core/src/test/java/org/springframework/batch/core/launch/support/SimpleExportedJobLauncherTests.java b/spring-batch-core/src/test/java/org/springframework/batch/core/launch/support/SimpleExportedJobLauncherTests.java index 534368c3c..362ece118 100644 --- a/spring-batch-core/src/test/java/org/springframework/batch/core/launch/support/SimpleExportedJobLauncherTests.java +++ b/spring-batch-core/src/test/java/org/springframework/batch/core/launch/support/SimpleExportedJobLauncherTests.java @@ -32,8 +32,8 @@ import org.springframework.batch.core.job.JobSupport; import org.springframework.batch.core.launch.JobLauncher; import org.springframework.batch.core.launch.support.SimpleExportedJobLauncher; import org.springframework.batch.core.repository.JobExecutionAlreadyRunningException; -import org.springframework.batch.core.runtime.JobParametersFactory; import org.springframework.batch.core.step.StepSupport; +import org.springframework.batch.core.support.JobParametersConverter; import org.springframework.batch.item.ExecutionContext; import org.springframework.batch.support.PropertiesConverter; @@ -181,7 +181,7 @@ public class SimpleExportedJobLauncherTests extends TestCase { */ public void testRunJobWithParametersAndFactory() throws Exception { jobLocator.register(new ReferenceJobFactory(new JobSupport("foo"))); - launcher.setJobParametersFactory(new JobParametersFactory() { + launcher.setJobParametersFactory(new JobParametersConverter() { public JobParameters getJobParameters(Properties properties) { return new JobParametersBuilder().addString("foo", "spam").toJobParameters(); } diff --git a/spring-batch-core/src/test/java/org/springframework/batch/core/repository/support/dao/AbstractStepDaoTests.java b/spring-batch-core/src/test/java/org/springframework/batch/core/repository/support/dao/AbstractStepDaoTests.java index 71733d4c8..41bb56759 100644 --- a/spring-batch-core/src/test/java/org/springframework/batch/core/repository/support/dao/AbstractStepDaoTests.java +++ b/spring-batch-core/src/test/java/org/springframework/batch/core/repository/support/dao/AbstractStepDaoTests.java @@ -29,7 +29,7 @@ import org.springframework.batch.core.job.JobSupport; import org.springframework.batch.core.repository.support.dao.JobExecutionDao; import org.springframework.batch.core.repository.support.dao.JobInstanceDao; import org.springframework.batch.core.repository.support.dao.StepExecutionDao; -import org.springframework.batch.core.runtime.ExitStatusExceptionClassifier; +import org.springframework.batch.core.step.ExitStatusExceptionClassifier; import org.springframework.batch.core.step.StepSupport; import org.springframework.batch.item.ExecutionContext; import org.springframework.batch.repeat.ExitStatus; diff --git a/spring-batch-core/src/test/java/org/springframework/batch/core/step/SimpleExitStatusExceptionClassifierTests.java b/spring-batch-core/src/test/java/org/springframework/batch/core/step/SimpleExitStatusExceptionClassifierTests.java index 782b873fe..ab7058628 100644 --- a/spring-batch-core/src/test/java/org/springframework/batch/core/step/SimpleExitStatusExceptionClassifierTests.java +++ b/spring-batch-core/src/test/java/org/springframework/batch/core/step/SimpleExitStatusExceptionClassifierTests.java @@ -19,7 +19,6 @@ package org.springframework.batch.core.step; import org.springframework.batch.core.JobInterruptedException; import org.springframework.batch.core.launch.support.ExitCodeMapper; import org.springframework.batch.core.repository.NoSuchJobException; -import org.springframework.batch.core.runtime.ExitStatusExceptionClassifier; import org.springframework.batch.repeat.ExitStatus; import junit.framework.TestCase; diff --git a/spring-batch-core/src/test/java/org/springframework/batch/core/launch/support/DefaultJobParametersFactoryTests.java b/spring-batch-core/src/test/java/org/springframework/batch/core/support/DefaultJobParametersConverterTests.java similarity index 94% rename from spring-batch-core/src/test/java/org/springframework/batch/core/launch/support/DefaultJobParametersFactoryTests.java rename to spring-batch-core/src/test/java/org/springframework/batch/core/support/DefaultJobParametersConverterTests.java index 33cc9bd43..e7234db41 100644 --- a/spring-batch-core/src/test/java/org/springframework/batch/core/launch/support/DefaultJobParametersFactoryTests.java +++ b/spring-batch-core/src/test/java/org/springframework/batch/core/support/DefaultJobParametersConverterTests.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.springframework.batch.core.launch.support; +package org.springframework.batch.core.support; import java.text.DateFormat; import java.text.DecimalFormat; @@ -25,16 +25,16 @@ import junit.framework.TestCase; import org.springframework.batch.core.JobParameters; import org.springframework.batch.core.JobParametersBuilder; -import org.springframework.batch.core.runtime.DefaultJobParametersFactory; +import org.springframework.batch.core.support.DefaultJobParametersConverter; import org.springframework.util.StringUtils; /** * @author Dave Syer * */ -public class DefaultJobParametersFactoryTests extends TestCase { +public class DefaultJobParametersConverterTests extends TestCase { - DefaultJobParametersFactory factory = new DefaultJobParametersFactory(); + DefaultJobParametersConverter factory = new DefaultJobParametersConverter(); DateFormat dateFormat = new SimpleDateFormat("MM/dd/yyyy"); diff --git a/spring-batch-core/src/test/java/org/springframework/batch/core/resource/StepExecutionProxyResourceTests.java b/spring-batch-core/src/test/java/org/springframework/batch/core/support/StepExecutionResourceProxyTests.java similarity index 90% rename from spring-batch-core/src/test/java/org/springframework/batch/core/resource/StepExecutionProxyResourceTests.java rename to spring-batch-core/src/test/java/org/springframework/batch/core/support/StepExecutionResourceProxyTests.java index fd1a0443b..c48a7a075 100644 --- a/spring-batch-core/src/test/java/org/springframework/batch/core/resource/StepExecutionProxyResourceTests.java +++ b/spring-batch-core/src/test/java/org/springframework/batch/core/support/StepExecutionResourceProxyTests.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.batch.core.resource; +package org.springframework.batch.core.support; import java.io.File; import java.io.IOException; @@ -28,25 +28,25 @@ import org.springframework.batch.core.JobParametersBuilder; import org.springframework.batch.core.Step; import org.springframework.batch.core.StepExecution; import org.springframework.batch.core.job.JobSupport; -import org.springframework.batch.core.resource.StepExecutionProxyResource; import org.springframework.batch.core.step.StepSupport; +import org.springframework.batch.core.support.StepExecutionResourceProxy; import org.springframework.core.io.ByteArrayResource; import org.springframework.core.io.DefaultResourceLoader; import org.springframework.core.io.Resource; /** - * Unit tests for {@link StepExecutionProxyResource} + * Unit tests for {@link StepExecutionResourceProxy} * * @author robert.kasanicky * @author Lucas Ward * @author Dave Syer */ -public class StepExecutionProxyResourceTests extends TestCase { +public class StepExecutionResourceProxyTests extends TestCase { /** * Object under test */ - private StepExecutionProxyResource resource = new StepExecutionProxyResource(); + private StepExecutionResourceProxy resource = new StepExecutionResourceProxy(); private char pathsep = File.separatorChar; @@ -105,7 +105,7 @@ public class StepExecutionProxyResourceTests extends TestCase { } public void testResoureLoaderAware() throws Exception { - resource = new StepExecutionProxyResource(); + resource = new StepExecutionResourceProxy(); resource.setResourceLoader(new DefaultResourceLoader() { public Resource getResource(String location) { return new ByteArrayResource("foo".getBytes()); diff --git a/spring-batch-core/src/test/resources/org/springframework/batch/core/repository/dao/data-source-context.xml b/spring-batch-core/src/test/resources/org/springframework/batch/core/repository/dao/data-source-context.xml deleted file mode 100644 index 3af145cf3..000000000 --- a/spring-batch-core/src/test/resources/org/springframework/batch/core/repository/dao/data-source-context.xml +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/spring-batch-core/src/test/resources/org/springframework/batch/core/repository/dao/destroy.sql b/spring-batch-core/src/test/resources/org/springframework/batch/core/repository/dao/destroy.sql deleted file mode 100644 index 461b9682d..000000000 --- a/spring-batch-core/src/test/resources/org/springframework/batch/core/repository/dao/destroy.sql +++ /dev/null @@ -1,10 +0,0 @@ --- Autogenerated: do not edit this file -DROP TABLE BATCH_STEP_EXECUTION_CONTEXT IF EXISTS; -DROP TABLE BATCH_STEP_EXECUTION IF EXISTS; -DROP TABLE BATCH_JOB_EXECUTION IF EXISTS; -DROP TABLE BATCH_JOB_PARAMS IF EXISTS; -DROP TABLE BATCH_JOB_INSTANCE IF EXISTS; - -DROP TABLE BATCH_STEP_EXECUTION_SEQ IF EXISTS; -DROP TABLE BATCH_JOB_EXECUTION_SEQ IF EXISTS; -DROP TABLE BATCH_JOB_SEQ IF EXISTS; \ No newline at end of file diff --git a/spring-batch-core/src/test/resources/org/springframework/batch/core/repository/dao/init.sql b/spring-batch-core/src/test/resources/org/springframework/batch/core/repository/dao/init.sql deleted file mode 100644 index ee822b8d7..000000000 --- a/spring-batch-core/src/test/resources/org/springframework/batch/core/repository/dao/init.sql +++ /dev/null @@ -1,73 +0,0 @@ --- Autogenerated: do not edit this file -CREATE TABLE BATCH_JOB_INSTANCE ( - JOB_INSTANCE_ID BIGINT IDENTITY PRIMARY KEY , - VERSION BIGINT, - JOB_NAME VARCHAR(100) NOT NULL , - JOB_KEY VARCHAR(2500) -); - -CREATE TABLE BATCH_JOB_EXECUTION ( - JOB_EXECUTION_ID BIGINT IDENTITY PRIMARY KEY , - VERSION BIGINT, - JOB_INSTANCE_ID BIGINT NOT NULL, - START_TIME TIMESTAMP, - END_TIME TIMESTAMP , - STATUS VARCHAR(10), - CONTINUABLE CHAR(1), - EXIT_CODE VARCHAR(20), - EXIT_MESSAGE VARCHAR(2500), - constraint JOB_INSTANCE_EXECUTION_FK foreign key (JOB_INSTANCE_ID) - references BATCH_JOB_INSTANCE(JOB_INSTANCE_ID) -); - -CREATE TABLE BATCH_JOB_PARAMS ( - JOB_INSTANCE_ID BIGINT NOT NULL , - TYPE_CD VARCHAR(6) NOT NULL , - KEY_NAME VARCHAR(100) NOT NULL , - STRING_VAL VARCHAR(250) , - DATE_VAL TIMESTAMP , - LONG_VAL BIGINT , - DOUBLE_VAL DOUBLE PRECISION, - constraint JOB_INSTANCE_PARAMS_FK foreign key (JOB_INSTANCE_ID) - references BATCH_JOB_INSTANCE(JOB_INSTANCE_ID) -); - -CREATE TABLE BATCH_STEP_EXECUTION ( - STEP_EXECUTION_ID BIGINT IDENTITY PRIMARY KEY , - VERSION BIGINT NOT NULL, - STEP_NAME VARCHAR(100) NOT NULL, - JOB_EXECUTION_ID BIGINT NOT NULL, - START_TIME TIMESTAMP NOT NULL , - END_TIME TIMESTAMP , - STATUS VARCHAR(10), - COMMIT_COUNT BIGINT , - TASK_COUNT BIGINT , - CONTINUABLE CHAR(1), - EXIT_CODE VARCHAR(20), - EXIT_MESSAGE VARCHAR(2500), - constraint JOB_EXECUTION_STEP_FK foreign key (JOB_EXECUTION_ID) - references BATCH_JOB_EXECUTION(JOB_EXECUTION_ID) -); - -CREATE TABLE BATCH_STEP_EXECUTION_CONTEXT ( - STEP_EXECUTION_ID BIGINT NOT NULL , - TYPE_CD VARCHAR(6) NOT NULL , - KEY_NAME VARCHAR(1000) NOT NULL , - STRING_VAL VARCHAR(1000) , - DATE_VAL TIMESTAMP , - LONG_VAL VARCHAR(10) , - DOUBLE_VAL DOUBLE PRECISION , - OBJECT_VAL LONGVARBINARY, - constraint STEP_EXECUTION_CONTEXT_FK foreign key (STEP_EXECUTION_ID) - references BATCH_STEP_EXECUTION(STEP_EXECUTION_ID) -); - -CREATE TABLE BATCH_STEP_EXECUTION_SEQ ( - ID BIGINT IDENTITY -); -CREATE TABLE BATCH_JOB_EXECUTION_SEQ ( - ID BIGINT IDENTITY -); -CREATE TABLE BATCH_JOB_SEQ ( - ID BIGINT IDENTITY -); diff --git a/spring-batch-core/src/test/resources/org/springframework/batch/core/repository/dao/sql-dao-test.xml b/spring-batch-core/src/test/resources/org/springframework/batch/core/repository/dao/sql-dao-test.xml deleted file mode 100644 index c0d3f0075..000000000 --- a/spring-batch-core/src/test/resources/org/springframework/batch/core/repository/dao/sql-dao-test.xml +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/spring-batch-samples/src/main/java/org/springframework/batch/sample/advice/JobExecutionNotificationPublisher.java b/spring-batch-samples/src/main/java/org/springframework/batch/sample/advice/JobExecutionNotificationPublisher.java index 54378303d..632bb551d 100644 --- a/spring-batch-samples/src/main/java/org/springframework/batch/sample/advice/JobExecutionNotificationPublisher.java +++ b/spring-batch-samples/src/main/java/org/springframework/batch/sample/advice/JobExecutionNotificationPublisher.java @@ -53,7 +53,7 @@ public class JobExecutionNotificationPublisher implements ApplicationListener, N * close we log the event at INFO level and send a JMX notification if we * are also an MBean. * - * @see org.springframework.batch.core.launch.SimpleJobLauncher#onApplicationEvent(org.springframework.context.ApplicationEvent) + * @see org.springframework.batch.core.launch.support.SimpleJobLauncher#onApplicationEvent(org.springframework.context.ApplicationEvent) */ public void onApplicationEvent(ApplicationEvent applicationEvent) { if (applicationEvent instanceof SimpleMessageApplicationEvent) { diff --git a/spring-batch-samples/src/main/resources/jobs/infiniteLoopJob.xml b/spring-batch-samples/src/main/resources/jobs/infiniteLoopJob.xml index 9496d38ed..edaaeec95 100644 --- a/spring-batch-samples/src/main/resources/jobs/infiniteLoopJob.xml +++ b/spring-batch-samples/src/main/resources/jobs/infiniteLoopJob.xml @@ -9,7 +9,7 @@ - + diff --git a/spring-batch-samples/src/main/resources/simple-job-launcher-context.xml b/spring-batch-samples/src/main/resources/simple-job-launcher-context.xml index 993e42b49..d141b69d5 100644 --- a/spring-batch-samples/src/main/resources/simple-job-launcher-context.xml +++ b/spring-batch-samples/src/main/resources/simple-job-launcher-context.xml @@ -14,7 +14,7 @@ - +