diff --git a/build-spring-batch/build.xml b/build-spring-batch/build.xml deleted file mode 100644 index 5006155d5..000000000 --- a/build-spring-batch/build.xml +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/build-spring-batch/package-bundle.xml b/build-spring-batch/package-bundle.xml deleted file mode 100644 index 67330f04d..000000000 --- a/build-spring-batch/package-bundle.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - - - - - diff --git a/build.gradle b/build.gradle index 01b202857..347a0c79f 100644 --- a/build.gradle +++ b/build.gradle @@ -100,8 +100,15 @@ subprojects { subproject -> toolVersion = "0.7.0.201403182114" } - sourceCompatibility=1.7 - targetCompatibility=1.7 + compileJava { + sourceCompatibility=1.6 + targetCompatibility=1.6 + } + + compileTestJava { + sourceCompatibility=1.7 + targetCompatibility=1.7 + } eclipse { project { @@ -545,6 +552,10 @@ task api(type: Javadoc) { options.author = true options.header = rootProject.description options.overview = 'src/api/overview.html' + if (JavaVersion.current().isJava8Compatible()) { + options.addStringOption('Xdoclint:none', '-quiet') + } + source subprojects.collect { project -> project.sourceSets.main.allJava } @@ -626,7 +637,7 @@ task distZip(type: Zip, dependsOn: [docsZip, schemaZip]) { into "${baseDir}/schema" } - subprojects.each { subproject -> + [project(':spring-batch-core'), project(':spring-batch-infrastructure'), project(':spring-batch-test'), project(':spring-batch-integration')].each { subproject -> into ("${baseDir}/libs") { from subproject.jar from subproject.sourcesJar diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 0ec936eb3..f5ee6ed8d 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ -#Wed Mar 05 11:53:35 EST 2014 +#Thu May 08 10:59:52 CDT 2014 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=http\://services.gradle.org/distributions/gradle-1.11-bin.zip +distributionUrl=http\://services.gradle.org/distributions/gradle-1.11-all.zip diff --git a/pom.xml b/pom.xml deleted file mode 100644 index c556b5606..000000000 --- a/pom.xml +++ /dev/null @@ -1,653 +0,0 @@ - - - 4.0.0 - org.springframework.batch - spring-batch - Spring Batch - Spring Batch provides tools for enterprise batch or bulk processing. It can be used to wire up jobs, and track - their execution, or simply as an optimization for repetitive processing in a transactional environment. Spring Batch is part of the Spring Portfolio. - 3.0.0.BUILD-SNAPSHOT - pom - - spring-batch-parent - spring-batch-infrastructure - spring-batch-core - spring-batch-test - spring-batch-integration - - http://projects.spring.io/spring-batch/ - - Pivotal - http://spring.io - - - http://github.com/spring-projects/spring-batch - scm:git:git://github.com/spring-projects/spring-batch.git - scm:git:ssh://git@github.com/spring-projects/spring-batch.git - HEAD - - - JIRA - https://jira.spring.io/browse/BATCH - - - - Spring Batch Forum - http://forum.spring.io/forum/spring-projects/batch - http://forum.spring.io/forum/spring-projects/batch - - - - Bamboo - https://build.spring.io/browse/BATCH - - - - Apache 2.0 - http://www.apache.org/licenses/LICENSE-2.0.txt - - - - UTF-8 - false - spring-batch - Spring Batch - BATCH - ${project.version} - ${dist.id}-${dist.version}-no-dependencies - ${dist.finalName}.zip - target/${dist.fileName} - dist.springframework.org - - - - all - - spring-batch-samples - spring-batch-infrastructure-tests - spring-batch-core-tests - - - - release - - spring-batch-samples - - - - - maven-assembly-plugin - false - - - zip-files - false - package - - single - - - - src/assembly/no-dependencies.xml - - - - - - - com.agilejava.docbkx - docbkx-maven-plugin - 2.0.8 - - - single-page - - generate-html - - - ${basedir}/src/docbkx/resources/xsl/html.xsl - - - - - - - - - - - - - - - - - - - - - - - - pre-site - - - single-pdf - - generate-pdf - - - src/site/docbook/reference/ - src/docbkx/resources/images/ - - - - - pre-site - - - multi-page - - generate-html - - - true - ${basedir}/src/docbkx/resources/xsl/html_chunk.xsl - - - - - - - - - - - - - - - - - - - - - - - - pre-site - - - - - org.docbook - docbook-xml - 4.4 - runtime - - - org.apache.xmlgraphics - fop - 0.93 - - - - index.xml - false - - css/html.css - ${basedir}/src/site/docbook/reference - ${basedir}/src/docbkx/resources/xsl/fopdf.xsl - true - - - version - ${project.version} - - - - - - org.apache.maven.plugins - maven-antrun-plugin - - - copy-parent-pom - generate-sources - - - - - - - run - - - - upload-dist - deploy - - run - - - - - - - - - - - - - - - - verify - - false - - - - - org.apache.maven.plugins - maven-antrun-plugin - - - extract - verify - - run - - - - - - - - - - - - - - - - - - - - - - - - - - org.apache.maven.plugins - maven-invoker-plugin - - target/it/no-dep - target/local-repo - true - ${basedir}/src/it/settings.xml - - test - - - samples/*/pom.xml - - - - - integration-test - verify - - run - - - - - - - - - build - - false - - - - - - org.apache.maven.plugins - maven-invoker-plugin - - ${basedir} - target/local-repo - true - ${basedir}/src/it/settings.xml - - clean - install - - - pom.xml - - - - - integration-test - verify - - run - - - - - - - - - samples - - spring-batch-samples - - - - milestone - - - spring-milestone - Spring Milestone Repository - s3://maven.springframework.org/milestone - - - - - central - - - sonatype-nexus-snapshots - Sonatype Nexus Snapshots - https://oss.sonatype.org/content/repositories/snapshots/ - - - sonatype-nexus-staging - Nexus Release Repository - https://oss.sonatype.org/service/local/staging/deploy/maven2/ - - - - - staging - - /${user.dir}/target/staging/dist - - - - staging - file:///${user.dir}/target/staging - - - staging - file:///${user.dir}/target/staging - - - staging - file:///${user.dir}/target/staging - - - - - - org.apache.maven.plugins - maven-deploy-plugin - - false - - - - - ${dist.finalName} - - - - manifest - - false - - - - - com.springsource.bundlor - com.springsource.bundlor.maven - - - bundlor-manifest - package - - manifest - - - - - - - - - jsr-352-tck - - spring-batch-jsr352-tck - - - - - - static.springframework.org - scp://static.springframework.org/var/www/domains/springframework.org/static/htdocs/spring-batch/trunk - - - spring-release - Spring Release Repository - s3://maven.springframework.org/release - - - spring-snapshot - Spring Snapshot Repository - s3://maven.springframework.org/snapshot - - - - - - org.springframework.build.aws - org.springframework.build.aws.maven - 3.0.0.RELEASE - - - - - - org.apache.maven.plugins - maven-release-plugin - 2.3 - - - org.apache.maven.plugins - maven-site-plugin - 2.2 - - - org.apache.maven.wagon - wagon-ssh - 1.0-beta-7 - - - - - org.apache.maven.plugins - maven-antrun-plugin - 1.4 - - - org.springframework.build - org.springframework.build.aws.ant - 3.0.5.RELEASE - - - net.java.dev.jets3t - jets3t - 0.7.2 - - - org.apache.ant - ant - 1.7.0 - - - org.apache.ant - ant-apache-regexp - 1.7.0 - - - - - org.apache.maven.plugins - maven-surefire-plugin - - junit:junit - - - - - - - org.apache.maven.plugins - maven-deploy-plugin - 2.7 - - true - - - - - - true - - - org.apache.maven.plugins - maven-project-info-reports-plugin - 2.1.1 - - - org.apache.maven.plugins - maven-surefire-report-plugin - 2.3 - - - org.codehaus.mojo - jdepend-maven-plugin - 2.0-beta-2 - - - maven-javadoc-plugin - 2.8.1 - - - html - - javadoc - - - - - true - true - - http://download.oracle.com/javaee/5/api - http://download.oracle.com/javase/1.5.0/docs/api - http://jakarta.apache.org/commons/collections/apidocs-COLLECTIONS_3_0/ - http://jakarta.apache.org/commons/dbcp/apidocs/ - http://jakarta.apache.org/commons/fileupload/apidocs/ - http://jakarta.apache.org/commons/httpclient/apidocs/ - http://jakarta.apache.org/commons/pool/apidocs/ - http://jakarta.apache.org/commons/logging/apidocs/ - http://junit.sourceforge.net/javadoc/ - http://logging.apache.org/log4j/docs/api/ - http://jakarta.apache.org/regexp/apidocs/ - http://jakarta.apache.org/velocity/api/ - http://docs.spring.io/spring/docs/3.2.0.RELEASE/javadoc-api/ - http://docs.spring.io/spring-batch/apidocs/ - http://docs.spring.io/spring-ws/site/apidocs/ - - test.*:*.example:*.sample - - - - org.apache.maven.plugins - maven-jxr-plugin - 2.3 - - - - - - dsyer - Dave Syer - david.syer@springsource.com - - - nebhale - Ben Hale - ben.hale@springsource.com - 0 - - - lward - Lucas Ward - lucas.l.ward@accenture.com - - - robokaso - Robert Kasanicky - robokaso@gmail.com - - - trisberg - Thomas Risberg - thomas.risberg@springsource.com - - - dhgarrette - Dan Garrette - dhgarrette@gmail.com - - - mminella - Michael Minella - mminella@vmware.com - - - cschaefer - Chris Schaefer - cschaefer@gopivotal.com - - - - - com.springsource.repository.bundles.snapshot - SpringSource Enterprise Bundle Repository - SpringSource Bundle Snapshots - http://repository.springsource.com/maven/bundles/snapshot - - - com.springsource.repository.bundles.release - SpringSource Enterprise Bundle Repository - SpringSource Bundle Releases - http://repository.springsource.com/maven/bundles/release - - false - - - - diff --git a/spring-batch-core-tests/pom.xml b/spring-batch-core-tests/pom.xml deleted file mode 100644 index 57df73c34..000000000 --- a/spring-batch-core-tests/pom.xml +++ /dev/null @@ -1,173 +0,0 @@ - - - 4.0.0 - spring-batch-core-tests - Core Tests - Integration tests for the Spring Batch Core - http://docs.spring.io/spring-batch/${project.artifactId} - - org.springframework.batch - spring-batch-parent - 3.0.0.BUILD-SNAPSHOT - ../spring-batch-parent - - - - default - - true - - - - - org.apache.maven.plugins - maven-surefire-plugin - - true - - - - - - - test - - - - org.apache.maven.plugins - maven-surefire-plugin - - - - job.commit.interval - 100 - - - games.file.name - games.csv - - - player.file.name - player.csv - - - ENVIRONMENT - ${environment} - - - - - - - - - derby - - derby - - - - - - org.springframework.batch - spring-batch-core - ${project.version} - - - commons-dbcp - commons-dbcp - - - org.hsqldb - hsqldb - - - mysql - mysql-connector-java - 5.1.6 - runtime - - - postgresql - postgresql - 8.3-603.jdbc3 - true - runtime - - - commons-io - commons-io - test - - - org.apache.derby - derby - - - junit - junit - - - log4j - log4j - test - - - org.springframework - spring-jdbc - - - org.springframework.retry - spring-retry - - - org.springframework - spring-test - test - - - org.springframework - spring-tx - - - org.springframework - spring-aop - - - org.springframework.ldap - spring-ldap-ldif-core - true - - - org.aspectj - aspectjrt - true - - - org.aspectj - aspectjweaver - true - - - cglib - cglib-nodep - true - - - - - - - org.apache.maven.plugins - maven-surefire-plugin - - junit:junit - - - - - - - hsql - - diff --git a/spring-batch-core-tests/src/site/apt/index.apt b/spring-batch-core-tests/src/site/apt/index.apt deleted file mode 100644 index 45d636ad3..000000000 --- a/spring-batch-core-tests/src/site/apt/index.apt +++ /dev/null @@ -1,15 +0,0 @@ - ------ - Spring Batch Integration Tests - ------ - Dave Syer - ------ - March 2008 - -Overview of the Spring Batch Integration Tests - - This module contains integration tests for the Spring Batch Infrastructure module. In the tests we exercise some extended and mostly realistic scenarios using the infrastructure components. - - * Message-pipeline tests. There are a bunch of tests using JMS and RDBMS in the same transaction, exercising various failure and retry scenarios. The basic premise is that throughput in such systems is greatly increased by widening the transactio nboundaries to process more than one message in each transaction. If there is a failure we may want to retry the operation in the next transaction. - - * OXM integration tests. There are also some tests of the XML reader and writers in Spring Batch with more extensive configuration than in the unit tests. - diff --git a/spring-batch-core-tests/src/site/site.xml b/spring-batch-core-tests/src/site/site.xml deleted file mode 100644 index 29c288783..000000000 --- a/spring-batch-core-tests/src/site/site.xml +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - - - - - - - - - - - diff --git a/spring-batch-core-tests/template.mf b/spring-batch-core-tests/template.mf deleted file mode 100755 index 610f374d6..000000000 --- a/spring-batch-core-tests/template.mf +++ /dev/null @@ -1,11 +0,0 @@ -Manifest-Version: 1.0 -Bundle-SymbolicName: org.springframework.batch.core.tests -Bundle-Name: Spring Batch Core Tests -Bundle-Vendor: Spring -Bundle-Version: ${version} -Bundle-ManifestVersion: 2 -Ignored-Existing-Headers: - Import-Package, - Export-Package -Import-Template: - *;version="0" diff --git a/spring-batch-core/pom.xml b/spring-batch-core/pom.xml deleted file mode 100644 index 7d3b05daf..000000000 --- a/spring-batch-core/pom.xml +++ /dev/null @@ -1,336 +0,0 @@ - - - 4.0.0 - spring-batch-core - jar - Core - Core domain for batch processing, expressing a domain of Jobs, Steps, Chunks, etc. - http://docs.spring.io/spring-batch/${project.artifactId} - - org.springframework.batch - spring-batch-parent - 3.0.0.BUILD-SNAPSHOT - ../spring-batch-parent - - - https://github.com/spring-projects/spring-batch - scm:git:git://github.com/spring-projects/spring-batch.git - scm:git:git://github.com/spring-projects/spring-batch.git - HEAD - - - - org.springframework.batch - spring-batch-infrastructure - ${project.version} - - - javax.batch - javax.batch-api - - - com.ibm.jbatch - com.ibm.jbatch-tck-spi - 1.0 - - - org.hsqldb - hsqldb - - - com.h2database - h2 - - - commons-io - commons-io - test - - - commons-dbcp - commons-dbcp - true - test - - - commons-pool - commons-pool - test - - - junit - junit - - - org.aspectj - aspectjrt - true - - - org.aspectj - aspectjweaver - true - - - cglib - cglib-nodep - test - - - com.thoughtworks.xstream - xstream - - - org.codehaus.jettison - jettison - - - org.osgi - osgi_R4_core - true - - - org.springframework - spring-aop - - - org.springframework - spring-beans - - - org.springframework - spring-context - - - org.springframework - spring-core - - - org.springframework - spring-jdbc - true - - - org.springframework.osgi - spring-osgi-core - true - - - org.springframework - spring-test - test - - - org.springframework - spring-tx - - - org.slf4j - slf4j-log4j12 - true - - - log4j - log4j - true - - - org.mockito - mockito-all - test - - - javax.inject - javax.inject - 1 - test - - - - - - org.apache.maven.plugins - maven-antrun-plugin - - - generate-sql - generate-sources - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - run - - - - - - - - - org.apache.maven.plugins - maven-surefire-plugin - - junit:junit - - - - - - - - - org.codehaus.mojo - emma-maven-plugin - 1.0-alpha-1 - - - - diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/ExitStatus.java b/spring-batch-core/src/main/java/org/springframework/batch/core/ExitStatus.java index 956940793..90ba46d89 100644 --- a/spring-batch-core/src/main/java/org/springframework/batch/core/ExitStatus.java +++ b/spring-batch-core/src/main/java/org/springframework/batch/core/ExitStatus.java @@ -15,12 +15,12 @@ */ package org.springframework.batch.core; +import org.springframework.util.StringUtils; + import java.io.PrintWriter; import java.io.Serializable; import java.io.StringWriter; -import org.springframework.util.StringUtils; - /** * Value object used to carry information about the status of a * job or step execution. @@ -105,8 +105,8 @@ public class ExitStatus implements Serializable, Comparable { * code, and a concatenation of the descriptions. If either value has a * higher severity then its exit code will be used in the result. In the * case of equal severity, the exit code is replaced if the new value is - * alphabetically greater.
- *
+ * alphabetically greater.
+ *
* * Severity is defined by the exit code: *
    @@ -117,7 +117,7 @@ public class ExitStatus implements Serializable, Comparable { *
  • Codes beginning with FAILED have severity 5
  • *
  • Codes beginning with UNKNOWN have severity 6
  • *
- * Others have severity 7, so custom exit codes always win.
+ * Others have severity 7, so custom exit codes always win.
* * If the input is null just return this. * diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/JobExecution.java b/spring-batch-core/src/main/java/org/springframework/batch/core/JobExecution.java index 45be8fc33..71b352294 100644 --- a/spring-batch-core/src/main/java/org/springframework/batch/core/JobExecution.java +++ b/spring-batch-core/src/main/java/org/springframework/batch/core/JobExecution.java @@ -16,6 +16,8 @@ package org.springframework.batch.core; +import org.springframework.batch.item.ExecutionContext; + import java.io.IOException; import java.io.ObjectInputStream; import java.util.ArrayList; @@ -28,8 +30,6 @@ import java.util.Set; import java.util.concurrent.CopyOnWriteArrayList; import java.util.concurrent.CopyOnWriteArraySet; -import org.springframework.batch.item.ExecutionContext; - /** * Batch domain object representing the execution of a job. * @@ -333,7 +333,7 @@ public class JobExecution extends Entity { * Return all failure causing exceptions for this JobExecution, including * step executions. * - * @return List containing all exceptions causing failure for + * @return List<Throwable> containing all exceptions causing failure for * this JobExecution. */ public synchronized List getAllFailureExceptions() { diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/JobParametersBuilder.java b/spring-batch-core/src/main/java/org/springframework/batch/core/JobParametersBuilder.java index 6939f6625..bedee3b52 100644 --- a/spring-batch-core/src/main/java/org/springframework/batch/core/JobParametersBuilder.java +++ b/spring-batch-core/src/main/java/org/springframework/batch/core/JobParametersBuilder.java @@ -16,21 +16,21 @@ package org.springframework.batch.core; +import org.springframework.util.Assert; + import java.util.Date; import java.util.LinkedHashMap; import java.util.Map; import java.util.Properties; -import org.springframework.util.Assert; - /** * Helper class for creating {@link JobParameters}. Useful because all * {@link JobParameter} objects are immutable, and must be instantiated separately * to ensure typesafety. Once created, it can be used in the * same was a java.lang.StringBuilder (except, order is irrelevant), by adding * various parameter types and creating a valid {@link JobParameters} once - * finished.
- *
+ * finished.
+ *
* Using the identifying flag indicates if the parameter will be used * in the identification of a JobInstance. That flag defaults to true. * diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/Step.java b/spring-batch-core/src/main/java/org/springframework/batch/core/Step.java index df0d61096..c5e83e4b8 100644 --- a/spring-batch-core/src/main/java/org/springframework/batch/core/Step.java +++ b/spring-batch-core/src/main/java/org/springframework/batch/core/Step.java @@ -42,7 +42,7 @@ public interface Step { /** * Process the step and assign progress and status meta information to the {@link StepExecution} provided. The * {@link Step} is responsible for setting the meta information and also saving it if required by the - * implementation.
+ * implementation.
* * It is not safe to re-use an instance of {@link Step} to process multiple concurrent executions. * diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/annotation/AfterChunk.java b/spring-batch-core/src/main/java/org/springframework/batch/core/annotation/AfterChunk.java index 2a0366f59..003a8b21e 100644 --- a/spring-batch-core/src/main/java/org/springframework/batch/core/annotation/AfterChunk.java +++ b/spring-batch-core/src/main/java/org/springframework/batch/core/annotation/AfterChunk.java @@ -15,17 +15,17 @@ */ package org.springframework.batch.core.annotation; +import org.springframework.batch.core.ChunkListener; +import org.springframework.batch.core.scope.context.ChunkContext; + import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; -import org.springframework.batch.core.ChunkListener; -import org.springframework.batch.core.scope.context.ChunkContext; - /** * Marks a method to be called after a chunk is executed.
- *
+ *
* Expected signature: void afterChunk(ChunkContext context) * * @author Lucas Ward diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/annotation/AfterChunkError.java b/spring-batch-core/src/main/java/org/springframework/batch/core/annotation/AfterChunkError.java index eba8a66a2..a8ef5fce5 100644 --- a/spring-batch-core/src/main/java/org/springframework/batch/core/annotation/AfterChunkError.java +++ b/spring-batch-core/src/main/java/org/springframework/batch/core/annotation/AfterChunkError.java @@ -15,18 +15,18 @@ */ package org.springframework.batch.core.annotation; +import org.springframework.batch.core.ChunkListener; +import org.springframework.batch.core.scope.context.ChunkContext; + import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; -import org.springframework.batch.core.ChunkListener; -import org.springframework.batch.core.scope.context.ChunkContext; - /** * Marks a method to be called after a has failed and been * marked for rollback.
- *
+ *
* Expected signature: void afterFailedChunk(ChunkContext context) * * @author Michael Minella diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/configuration/annotation/EnableBatchProcessing.java b/spring-batch-core/src/main/java/org/springframework/batch/core/configuration/annotation/EnableBatchProcessing.java index 662197c0c..cedf8cc83 100644 --- a/spring-batch-core/src/main/java/org/springframework/batch/core/configuration/annotation/EnableBatchProcessing.java +++ b/spring-batch-core/src/main/java/org/springframework/batch/core/configuration/annotation/EnableBatchProcessing.java @@ -33,7 +33,7 @@ import java.lang.annotation.Target; /** *

* Enable Spring Batch features and provide a base configuration for setting up batch jobs in an @Configuration - * class, roughly equivalent to using the {@code } XML namespace. + * class, roughly equivalent to using the {@code } XML namespace.

* *
  * @Configuration
@@ -134,8 +134,6 @@ import java.lang.annotation.Target;
  * especially if a {@link BatchConfigurer} is provided, because cyclic configuration dependencies are otherwise likely
  * to develop.
  *
- * 

- * *

* For reference, the first example above can be compared to the following Spring XML configuration: * diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/configuration/annotation/StepScope.java b/spring-batch-core/src/main/java/org/springframework/batch/core/configuration/annotation/StepScope.java index b95c4c129..19e66489e 100644 --- a/spring-batch-core/src/main/java/org/springframework/batch/core/configuration/annotation/StepScope.java +++ b/spring-batch-core/src/main/java/org/springframework/batch/core/configuration/annotation/StepScope.java @@ -15,13 +15,13 @@ */ package org.springframework.batch.core.configuration.annotation; +import org.springframework.context.annotation.Scope; +import org.springframework.context.annotation.ScopedProxyMode; + import java.lang.annotation.Documented; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; -import org.springframework.context.annotation.Scope; -import org.springframework.context.annotation.ScopedProxyMode; - /** *

* Convenient annotation for step scoped beans that defaults the proxy mode, so that it doesn't have to be specified @@ -42,7 +42,7 @@ import org.springframework.context.annotation.ScopedProxyMode; * * @author Dave Syer * - * @Since 2.2 + * @since 2.2 * */ @Scope(value = "step", proxyMode = ScopedProxyMode.TARGET_CLASS) diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/configuration/support/DefaultJobLoader.java b/spring-batch-core/src/main/java/org/springframework/batch/core/configuration/support/DefaultJobLoader.java index 260618e28..bfec62a1b 100644 --- a/spring-batch-core/src/main/java/org/springframework/batch/core/configuration/support/DefaultJobLoader.java +++ b/spring-batch-core/src/main/java/org/springframework/batch/core/configuration/support/DefaultJobLoader.java @@ -15,12 +15,6 @@ */ package org.springframework.batch.core.configuration.support; -import java.util.ArrayList; -import java.util.Collection; -import java.util.HashSet; -import java.util.Map; -import java.util.concurrent.ConcurrentHashMap; - import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.springframework.batch.core.Job; @@ -36,6 +30,12 @@ import org.springframework.context.ApplicationContext; import org.springframework.context.ConfigurableApplicationContext; import org.springframework.util.Assert; +import java.util.ArrayList; +import java.util.Collection; +import java.util.HashSet; +import java.util.Map; +import java.util.concurrent.ConcurrentHashMap; + /** * Default implementation of {@link JobLoader}. Uses a {@link JobRegistry} to * manage a population of loaded jobs and clears them up when asked. An optional @@ -208,7 +208,7 @@ public class DefaultJobLoader implements JobLoader, InitializingBean { /** * Returns all the {@link Step} instances defined by the specified {@link StepLocator}. - *

+ *
* The specified jobApplicationContext is used to collect additional steps that * are not exposed by the step locator * @@ -238,7 +238,7 @@ public class DefaultJobLoader implements JobLoader, InitializingBean { /** * Registers the specified {@link Job} defined in the specified {@link ConfigurableApplicationContext}. - *

+ *
* Makes sure to update the {@link StepRegistry} if it is available. * * @param context the context in which the job is defined diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/configuration/xml/StepParserStepFactoryBean.java b/spring-batch-core/src/main/java/org/springframework/batch/core/configuration/xml/StepParserStepFactoryBean.java index d4d9b7fda..5e08682d4 100644 --- a/spring-batch-core/src/main/java/org/springframework/batch/core/configuration/xml/StepParserStepFactoryBean.java +++ b/spring-batch-core/src/main/java/org/springframework/batch/core/configuration/xml/StepParserStepFactoryBean.java @@ -961,11 +961,11 @@ public class StepParserStepFactoryBean implements FactoryBean, BeanN /** * Public setter for the capacity of the cache in the retry policy. If more items than this fail without being * skipped or recovered an exception will be thrown. This is to guard against inadvertent infinite loops generated - * by item identity problems.
- *

+ * by item identity problems.
+ *
* The default value should be high enough and more for most purposes. To breach the limit in a single-threaded step * typically you have to have this many failures in a single transaction. Defaults to the value in the - * {@link MapRetryContextCache}.
+ * {@link MapRetryContextCache}.
* * @param cacheCapacity the cache capacity to set (greater than 0 else ignored) */ diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/converter/DefaultJobParametersConverter.java b/spring-batch-core/src/main/java/org/springframework/batch/core/converter/DefaultJobParametersConverter.java index a40d84547..1a2d953a7 100644 --- a/spring-batch-core/src/main/java/org/springframework/batch/core/converter/DefaultJobParametersConverter.java +++ b/spring-batch-core/src/main/java/org/springframework/batch/core/converter/DefaultJobParametersConverter.java @@ -15,6 +15,13 @@ */ package org.springframework.batch.core.converter; +import org.springframework.batch.core.JobInstance; +import org.springframework.batch.core.JobParameter; +import org.springframework.batch.core.JobParameter.ParameterType; +import org.springframework.batch.core.JobParameters; +import org.springframework.batch.core.JobParametersBuilder; +import org.springframework.util.StringUtils; + import java.text.DateFormat; import java.text.DecimalFormat; import java.text.NumberFormat; @@ -27,13 +34,6 @@ import java.util.Map; import java.util.Map.Entry; import java.util.Properties; -import org.springframework.batch.core.JobInstance; -import org.springframework.batch.core.JobParameter; -import org.springframework.batch.core.JobParameter.ParameterType; -import org.springframework.batch.core.JobParameters; -import org.springframework.batch.core.JobParametersBuilder; -import org.springframework.util.StringUtils; - /** * Converter for {@link JobParameters} instances using a simple naming * convention for property keys. Key names that are prefixed with a - are @@ -50,7 +50,7 @@ import org.springframework.util.StringUtils; * The literal values are converted to the correct type using the default Spring * strategies, augmented if necessary by the custom editors provided. * - *
+ *
* * If you need to be able to parse and format local-specific dates and numbers, * you can inject formatters ({@link #setDateFormat(DateFormat)} and diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/job/flow/support/DefaultStateTransitionComparator.java b/spring-batch-core/src/main/java/org/springframework/batch/core/job/flow/support/DefaultStateTransitionComparator.java index 10c636b3a..d4b6dc874 100644 --- a/spring-batch-core/src/main/java/org/springframework/batch/core/job/flow/support/DefaultStateTransitionComparator.java +++ b/spring-batch-core/src/main/java/org/springframework/batch/core/job/flow/support/DefaultStateTransitionComparator.java @@ -15,15 +15,15 @@ */ package org.springframework.batch.core.job.flow.support; -import java.util.Comparator; - import org.springframework.util.StringUtils; +import java.util.Comparator; + /** * Sorts by decreasing specificity of pattern, based on just counting * wildcards (with * taking precedence over ?). If wildcard counts are equal * then falls back to alphabetic comparison. Hence * > foo* > ??? > - * fo? > foo. + * fo? > foo. * * @see Comparator * @author Michael Minella diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/jsr/configuration/support/SpringAutowiredAnnotationBeanPostProcessor.java b/spring-batch-core/src/main/java/org/springframework/batch/core/jsr/configuration/support/SpringAutowiredAnnotationBeanPostProcessor.java index 6f161b085..5b85b7f20 100644 --- a/spring-batch-core/src/main/java/org/springframework/batch/core/jsr/configuration/support/SpringAutowiredAnnotationBeanPostProcessor.java +++ b/spring-batch-core/src/main/java/org/springframework/batch/core/jsr/configuration/support/SpringAutowiredAnnotationBeanPostProcessor.java @@ -67,9 +67,11 @@ import org.springframework.util.ReflectionUtils; *

This class is considered a quick work around and needs to be refactored / removed.

* *

The in addition to making this class package private, the following methods were modified to be protected:

- *
  • findAutowiringMetadata(Class clazz)
  • - *
  • buildAutowiringMetadata(Class clazz)
  • + *
      + *
    • findAutowiringMetadata(Class<?> clazz)
    • + *
    • buildAutowiringMetadata(Class<?> clazz)
    • *
    • findAutowiredAnnotation(AccessibleObject ao)
    • + *
    */ class SpringAutowiredAnnotationBeanPostProcessor extends InstantiationAwareBeanPostProcessorAdapter implements MergedBeanDefinitionPostProcessor, PriorityOrdered, BeanFactoryAware { diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/launch/JobOperator.java b/spring-batch-core/src/main/java/org/springframework/batch/core/launch/JobOperator.java index 129203c47..e71d1df1d 100644 --- a/spring-batch-core/src/main/java/org/springframework/batch/core/launch/JobOperator.java +++ b/spring-batch-core/src/main/java/org/springframework/batch/core/launch/JobOperator.java @@ -15,10 +15,6 @@ */ package org.springframework.batch.core.launch; -import java.util.List; -import java.util.Map; -import java.util.Set; - import org.springframework.batch.core.Job; import org.springframework.batch.core.JobExecution; import org.springframework.batch.core.JobInstance; @@ -31,6 +27,10 @@ import org.springframework.batch.core.repository.JobExecutionAlreadyRunningExcep import org.springframework.batch.core.repository.JobInstanceAlreadyCompleteException; import org.springframework.batch.core.repository.JobRestartException; +import java.util.List; +import java.util.Map; +import java.util.Set; + /** * Low level interface for inspecting and controlling jobs with access only to * primitive and collection types. Suitable for a command-line client (e.g. that @@ -130,8 +130,8 @@ public interface JobOperator { * {@link JobParametersIncrementer} attached to the specified job. If the * previous instance is still in a failed state, this method should still * create a new instance and run it with different parameters (as long as - * the {@link JobParametersIncrementer} is working).
    - *
    + * the {@link JobParametersIncrementer} is working).
    + *
    * * The last three exception described below should be extremely unlikely, * but cannot be ruled out entirely. It points to some other thread or 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 1091218e6..a63c8a7c1 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 @@ -15,19 +15,6 @@ */ package org.springframework.batch.core.launch.support; -import java.io.BufferedReader; -import java.io.IOException; -import java.io.InputStreamReader; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.Collections; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Properties; -import java.util.Set; - import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.springframework.batch.core.BatchStatus; @@ -58,6 +45,19 @@ import org.springframework.context.support.ClassPathXmlApplicationContext; import org.springframework.util.Assert; import org.springframework.util.StringUtils; +import java.io.BufferedReader; +import java.io.IOException; +import java.io.InputStreamReader; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collections; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Properties; +import java.util.Set; + /** *

    * Basic launcher for starting jobs from the command line. In general, it is @@ -101,11 +101,12 @@ import org.springframework.util.StringUtils; *

    * * - * jobPath jobIdentifier (jobParameters)* + * jobPath <options> jobIdentifier (jobParameters)* * * *

    * The command line options are as follows + *

    *
      *
    • jobPath: the xml application context containing a {@link Job} *
    • -restart: (optional) to restart the last failed execution
    • @@ -118,7 +119,6 @@ import org.springframework.util.StringUtils; *
    • jobParameters: 0 to many parameters that will be used to launch a job * specified in the form of key=value pairs. *
    - *

    * *

    * If the -next option is used the parameters on the command line @@ -135,18 +135,18 @@ import org.springframework.util.StringUtils; * {@link JobParameters} using a {@link JobParametersConverter} from the * application context (if there is one, or a * {@link DefaultJobParametersConverter} otherwise). Below is an example - * arguments list: " + * arguments list: "

    * *

    * * java org.springframework.batch.core.launch.support.CommandLineJobRunner testJob.xml * testJob schedule.date=2008/01/24 vendor.id=3902483920 - * + * *

    * *

    * Once arguments have been successfully parsed, autowiring will be used to set - * various dependencies. The {@JobLauncher} for example, will be + * various dependencies. The {@link JobLauncher} for example, will be * loaded this way. If none is contained in the bean factory (it searches by * type) then a {@link BeanDefinitionStoreException} will be thrown. The same * exception will also be thrown if there is more than one present. Assuming the @@ -502,11 +502,11 @@ public class CommandLineJobRunner { * such contexts. No exception are thrown from this method, rather * exceptions are logged and an integer returned through the exit status in * a {@link JvmSystemExiter} (which can be overridden by defining one in the - * Spring context).
    + * Spring context).
    * Parameters can be provided in the form key=value, and will be converted * using the injected {@link JobParametersConverter}. * - * @param args

    + * @param args *

      *
    • -restart: (optional) if the job has failed or stopped and the most * should be restarted. If specified then the jobIdentifier parameter can be @@ -520,6 +520,7 @@ public class CommandLineJobRunner { *
    • jobParameters: 0 to many parameters that will be used to launch a * job. *
    + *

    * The options (-restart, -next) can occur anywhere in the * command line. *

    diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/launch/support/SimpleJobLauncher.java b/spring-batch-core/src/main/java/org/springframework/batch/core/launch/support/SimpleJobLauncher.java index 39ea3ae4e..fbafc04a9 100644 --- a/spring-batch-core/src/main/java/org/springframework/batch/core/launch/support/SimpleJobLauncher.java +++ b/spring-batch-core/src/main/java/org/springframework/batch/core/launch/support/SimpleJobLauncher.java @@ -53,7 +53,7 @@ import org.springframework.util.Assert; * Repository can reliably recreate it. * * @author Lucas Ward - * @Author Dave Syer + * @author Dave Syer * @author Will Schipp * @author Michael Minella * diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/partition/StepExecutionSplitter.java b/spring-batch-core/src/main/java/org/springframework/batch/core/partition/StepExecutionSplitter.java index da70b143e..c1b1cd8f9 100644 --- a/spring-batch-core/src/main/java/org/springframework/batch/core/partition/StepExecutionSplitter.java +++ b/spring-batch-core/src/main/java/org/springframework/batch/core/partition/StepExecutionSplitter.java @@ -16,12 +16,12 @@ package org.springframework.batch.core.partition; -import java.util.Set; - import org.springframework.batch.core.JobExecution; import org.springframework.batch.core.JobExecutionException; import org.springframework.batch.core.StepExecution; +import java.util.Set; + /** * Strategy interface for generating input contexts for a partitioned step * execution independent from the fabric they are going to run on. @@ -44,8 +44,8 @@ public interface StepExecutionSplitter { * executable instances with the same parent {@link JobExecution}. The grid * size will be treated as a hint for the size of the collection to be * returned. It may or may not correspond to the physical size of an - * execution grid.
    - *
    + * execution grid.
    + *
    * * On a restart clients of the {@link StepExecutionSplitter} should expect * it to reconstitute the state of the last failed execution and only return diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/partition/support/TaskExecutorPartitionHandler.java b/spring-batch-core/src/main/java/org/springframework/batch/core/partition/support/TaskExecutorPartitionHandler.java index 083274862..549e8af4c 100644 --- a/spring-batch-core/src/main/java/org/springframework/batch/core/partition/support/TaskExecutorPartitionHandler.java +++ b/spring-batch-core/src/main/java/org/springframework/batch/core/partition/support/TaskExecutorPartitionHandler.java @@ -16,12 +16,6 @@ package org.springframework.batch.core.partition.support; -import java.util.HashSet; -import java.util.Set; -import java.util.concurrent.Callable; -import java.util.concurrent.Future; -import java.util.concurrent.FutureTask; - import org.springframework.batch.core.BatchStatus; import org.springframework.batch.core.ExitStatus; import org.springframework.batch.core.Step; @@ -35,12 +29,18 @@ import org.springframework.core.task.TaskExecutor; import org.springframework.core.task.TaskRejectedException; import org.springframework.util.Assert; +import java.util.HashSet; +import java.util.Set; +import java.util.concurrent.Callable; +import java.util.concurrent.Future; +import java.util.concurrent.FutureTask; + /** * A {@link PartitionHandler} that uses a {@link TaskExecutor} to execute the * partitioned {@link Step} locally in multiple threads. This can be an * effective approach for scaling batch steps that are IO intensive, like * directory and filesystem scanning and copying. - *

    + *
    * By default, the thread pool is synchronous. * * @author Sebastien Gerard diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/repository/JobRepository.java b/spring-batch-core/src/main/java/org/springframework/batch/core/repository/JobRepository.java index d4d48a448..cef28dbfe 100644 --- a/spring-batch-core/src/main/java/org/springframework/batch/core/repository/JobRepository.java +++ b/spring-batch-core/src/main/java/org/springframework/batch/core/repository/JobRepository.java @@ -16,8 +16,6 @@ package org.springframework.batch.core.repository; -import java.util.Collection; - import org.springframework.batch.core.Job; import org.springframework.batch.core.JobExecution; import org.springframework.batch.core.JobInstance; @@ -29,6 +27,8 @@ import org.springframework.batch.core.repository.dao.JobInstanceDao; import org.springframework.batch.item.ExecutionContext; import org.springframework.transaction.annotation.Isolation; +import java.util.Collection; + /** *

    * Repository responsible for persistence of batch meta-data entities. @@ -100,7 +100,7 @@ public interface JobRepository { * support the higher isolation levels). *

    * - * @param jobName the name of the job that is to be executed

    + * @param jobName the name of the job that is to be executed * * @param jobParameters the runtime parameters for the job * diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/repository/dao/JdbcStepExecutionDao.java b/spring-batch-core/src/main/java/org/springframework/batch/core/repository/dao/JdbcStepExecutionDao.java index 42c9a347e..2ffcf03ab 100644 --- a/spring-batch-core/src/main/java/org/springframework/batch/core/repository/dao/JdbcStepExecutionDao.java +++ b/spring-batch-core/src/main/java/org/springframework/batch/core/repository/dao/JdbcStepExecutionDao.java @@ -16,17 +16,6 @@ package org.springframework.batch.core.repository.dao; -import java.sql.PreparedStatement; -import java.sql.ResultSet; -import java.sql.SQLException; -import java.sql.Timestamp; -import java.sql.Types; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.Collection; -import java.util.Iterator; -import java.util.List; - import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.springframework.batch.core.BatchStatus; @@ -40,18 +29,29 @@ import org.springframework.jdbc.core.simple.ParameterizedRowMapper; import org.springframework.jdbc.support.incrementer.DataFieldMaxValueIncrementer; import org.springframework.util.Assert; +import java.sql.PreparedStatement; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.sql.Timestamp; +import java.sql.Types; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collection; +import java.util.Iterator; +import java.util.List; + /** - * JDBC implementation of {@link StepExecutionDao}.
    + * JDBC implementation of {@link StepExecutionDao}.
    * * Allows customization of the tables names used by Spring Batch for step meta - * data via a prefix property.
    + * data via a prefix property.
    * * Uses sequences or tables (via Spring's {@link DataFieldMaxValueIncrementer} * abstraction) to create all primary keys before inserting a new row. All * objects are checked to ensure all fields to be stored are not null. If any * are found to be null, an IllegalArgumentException will be thrown. This could * be left to JdbcTemplate, however, the exception will be fairly vague, and - * fails to highlight which field caused the exception.
    + * fails to highlight which field caused the exception.
    * * @author Lucas Ward * @author Dave Syer diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/scope/JobScope.java b/spring-batch-core/src/main/java/org/springframework/batch/core/scope/JobScope.java index c7cdd33e9..c34034e1a 100644 --- a/spring-batch-core/src/main/java/org/springframework/batch/core/scope/JobScope.java +++ b/spring-batch-core/src/main/java/org/springframework/batch/core/scope/JobScope.java @@ -28,8 +28,8 @@ import org.springframework.beans.factory.config.Scope; * Scope for job context. Objects in this scope use the Spring container as an * object factory, so there is only one instance of such a bean per executing * job. All objects in this scope are <aop:scoped-proxy/> (no need to - * decorate the bean definitions).
    - *
    + * decorate the bean definitions).
    + *
    * * In addition, support is provided for late binding of references accessible * from the {@link JobContext} using #{..} placeholders. Using this feature, diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/scope/StepScope.java b/spring-batch-core/src/main/java/org/springframework/batch/core/scope/StepScope.java index b1f933358..423f018ce 100644 --- a/spring-batch-core/src/main/java/org/springframework/batch/core/scope/StepScope.java +++ b/spring-batch-core/src/main/java/org/springframework/batch/core/scope/StepScope.java @@ -28,8 +28,8 @@ import org.springframework.beans.factory.config.Scope; * Scope for step context. Objects in this scope use the Spring container as an * object factory, so there is only one instance of such a bean per executing * step. All objects in this scope are <aop:scoped-proxy/> (no need to - * decorate the bean definitions).
    - *
    + * decorate the bean definitions).
    + *
    * * In addition, support is provided for late binding of references accessible * from the {@link StepContext} using #{..} placeholders. Using this feature, diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/step/factory/FaultTolerantStepFactoryBean.java b/spring-batch-core/src/main/java/org/springframework/batch/core/step/factory/FaultTolerantStepFactoryBean.java index 566847214..1e66a6ec1 100755 --- a/spring-batch-core/src/main/java/org/springframework/batch/core/step/factory/FaultTolerantStepFactoryBean.java +++ b/spring-batch-core/src/main/java/org/springframework/batch/core/step/factory/FaultTolerantStepFactoryBean.java @@ -109,11 +109,11 @@ public class FaultTolerantStepFactoryBean extends SimpleStepFactoryBean + * by item identity problems.
    * * The default value should be high enough and more for most purposes. To breach the limit in a single-threaded step * typically you have to have this many failures in a single transaction. Defaults to the value in the - * {@link MapRetryContextCache}.
    + * {@link MapRetryContextCache}.
    * * This property is ignored if the {@link #setRetryContextCache(RetryContextCache)} is set directly. * @@ -186,7 +186,7 @@ public class FaultTolerantStepFactoryBean extends SimpleStepFactoryBean + *
    * Defaults to all no exception. * * @param exceptionClasses defaults to Exception @@ -199,7 +199,7 @@ public class FaultTolerantStepFactoryBean extends SimpleStepFactoryBean + *
    * Defaults is empty. * * @param noRollbackExceptionClasses the exception classes to set diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/step/skip/SkipLimitExceededException.java b/spring-batch-core/src/main/java/org/springframework/batch/core/step/skip/SkipLimitExceededException.java index e20b2d6ee..fa278dd32 100644 --- a/spring-batch-core/src/main/java/org/springframework/batch/core/step/skip/SkipLimitExceededException.java +++ b/spring-batch-core/src/main/java/org/springframework/batch/core/step/skip/SkipLimitExceededException.java @@ -17,7 +17,7 @@ package org.springframework.batch.core.step.skip; /** - * Exception indicating that the skip limit for a particular {@Step} has + * Exception indicating that the skip limit for a particular {@link org.springframework.batch.core.Step} has * been exceeded. * * @author Ben Hale diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/step/skip/SkipPolicy.java b/spring-batch-core/src/main/java/org/springframework/batch/core/step/skip/SkipPolicy.java index c14e34edd..c0f43768a 100644 --- a/spring-batch-core/src/main/java/org/springframework/batch/core/step/skip/SkipPolicy.java +++ b/spring-batch-core/src/main/java/org/springframework/batch/core/step/skip/SkipPolicy.java @@ -26,9 +26,9 @@ public interface SkipPolicy { /** * Returns true or false, indicating whether or not processing should * continue with the given throwable. Clients may use - * skipCount<0 to probe for exception types that are skippable, + * {@code skipCount<0} to probe for exception types that are skippable, * so implementations should be able to handle gracefully the case where - * skipCount<0. Implementations should avoid throwing any + * {@code skipCount<0}. Implementations should avoid throwing any * undeclared exceptions. * * @param t exception encountered while reading diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/step/tasklet/SimpleSystemProcessExitCodeMapper.java b/spring-batch-core/src/main/java/org/springframework/batch/core/step/tasklet/SimpleSystemProcessExitCodeMapper.java index ba27551f9..55c7b4ab7 100644 --- a/spring-batch-core/src/main/java/org/springframework/batch/core/step/tasklet/SimpleSystemProcessExitCodeMapper.java +++ b/spring-batch-core/src/main/java/org/springframework/batch/core/step/tasklet/SimpleSystemProcessExitCodeMapper.java @@ -21,8 +21,8 @@ import org.springframework.batch.core.ExitStatus; /** * Simple {@link SystemProcessExitCodeMapper} implementation that performs following mapping: * - * 0 -> ExitStatus.FINISHED - * else -> ExitStatus.FAILED + * 0 -> ExitStatus.FINISHED + * else -> ExitStatus.FAILED * * @author Robert Kasanicky */ diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/step/tasklet/TaskletStep.java b/spring-batch-core/src/main/java/org/springframework/batch/core/step/tasklet/TaskletStep.java index be8e58180..096570916 100644 --- a/spring-batch-core/src/main/java/org/springframework/batch/core/step/tasklet/TaskletStep.java +++ b/spring-batch-core/src/main/java/org/springframework/batch/core/step/tasklet/TaskletStep.java @@ -15,8 +15,6 @@ */ package org.springframework.batch.core.step.tasklet; -import java.util.concurrent.Semaphore; - import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.springframework.batch.core.BatchStatus; @@ -53,13 +51,15 @@ import org.springframework.transaction.support.TransactionSynchronizationManager import org.springframework.transaction.support.TransactionTemplate; import org.springframework.util.Assert; +import java.util.concurrent.Semaphore; + /** * Simple implementation of executing the step as a call to a {@link Tasklet}, * possibly repeated, and each call surrounded by a transaction. The structure * is therefore that of a loop with transaction boundary inside the loop. The * loop is controlled by the step operations ( - * {@link #setStepOperations(RepeatOperations)}).
    - *
    + * {@link #setStepOperations(RepeatOperations)}).
    + *
    * * Clients can use interceptors in the step operations to intercept or listen to * the iteration on a step-wide basis, for instance to get a callback when the @@ -233,7 +233,7 @@ public class TaskletStep extends AbstractStep { * given an up to date {@link BatchStatus}, and the {@link JobRepository} is * used to store the result. Various reporting information are also added to * the current context governing the step execution, which would normally be - * available to the caller through the step's {@link ExecutionContext}.
    + * available to the caller through the step's {@link ExecutionContext}.
    * * @throws JobInterruptedException if the step or a chunk is interrupted * @throws RuntimeException if there is an exception during a chunk diff --git a/spring-batch-core/src/site/apt/changelog.apt b/spring-batch-core/src/site/apt/changelog.apt deleted file mode 100644 index 18947ba75..000000000 --- a/spring-batch-core/src/site/apt/changelog.apt +++ /dev/null @@ -1,8 +0,0 @@ -Changelog: Spring Batch Core - -* 1.0-M2 - -** 2007/07/12 - - * No-one uses this file: we should just switch to auto-generated changelogs? - diff --git a/spring-batch-core/src/site/apt/executable.apt b/spring-batch-core/src/site/apt/executable.apt deleted file mode 100644 index ec70e9936..000000000 --- a/spring-batch-core/src/site/apt/executable.apt +++ /dev/null @@ -1,38 +0,0 @@ - - Tried to create an executable jar with this: - -+--- - - - - org.apache.maven.plugins - maven-jar-plugin - - - - org.springframework.batch.container.bootstrap.BatchCommandLineLauncher - true - - - - - - -+--- - - But the resulting MANIFEST.MF is rubbish. Look at the classpath - (where did that come from)? - -+--- -Manifest-Version: 1.0 -Archiver-Version: Plexus Archiver -Created-By: Apache Maven -Built-By: dsyer -Build-Jdk: 1.5.0_09 -Main-Class: org.springframework.batch.container.bootstrap.BatchCommand - LineLauncher -Class-Path: spring-2.1-m2.jar commons-logging-1.1.jar log4j-1.2.12.jar - dom4j-1.6.1.jar commons-lang-2.1.jar spring-batch-infrastructure-1.0 - -m2-SNAPSHOT.jar antlr-2.7.6.jar commons-collections-2.1.1.jar hibern - ate-3.2.3.ga.jar spring-mock-2.1-m2.jar ehcache-1.2.3.jar -+--- diff --git a/spring-batch-core/src/site/apt/glossary.apt b/spring-batch-core/src/site/apt/glossary.apt deleted file mode 100644 index 1b2e1aac5..000000000 --- a/spring-batch-core/src/site/apt/glossary.apt +++ /dev/null @@ -1,46 +0,0 @@ - ------ - Glossary - ------ - Wayne Lund - ------ - May 2007 - - - [[1]]<>: An accumulation of business transactions over time. - - [[2]]<>: Term used to designate batch as an application style in its own right similar to online, Web or SOA. It has standard elements of input, validation, transformation of information to business model, business processing and output. In addition, it requires monitoring at a macro level. - - [[3]]<>: The handling of a batch of many business transactions that have accumulated over a period of time (e.g. an hour, day, week, month, or year). It is the application of a process, or set of processes, to many data entities or objects in a repetitive and predictable fashion with either no manual element, or a separate manual element for error processing. - - [[4]]<>: The time frame within which a batch job must complete. This can be constrained by other systems coming online, other dependent jobs needing to execute or other factors specific to the batch environment. - - [[5]]<>: It is the main batch task or Unit of Work controller. It initializes the module, and controls the transaction environment based on commit interval setting, etc. - - [[6]]<>: The main application program created by application developer to process the business logic for each LUW. - - [[7]]<>: Job Types describe application of jobs for particular type of processing. Common areas are interface processing (typically flat files), forms processing (either for online pdf generation or print formats), report processing. s - - [[8]]<>: A driving query identifies the set of work for a job to do; the job then breaks that work into individual units of work. For instance, identify all financial transactions that have a status of "pending transmission" and send them to our partner system. The driving query returns a set of record IDs to process; each record ID then becomes a unit of work. A driving query may involve a join (if the criteria for selection falls across two or more tables) or it may work with a single table. - - [[9]]<>: A batch job iterates through a driving query (or another input source such as a file) to perform the set of work that the job must accomplish. Each iteration of work performed is a unit of work. - - [[10]]<>: A set of LUWs constitute a commit interval. - - [[11]]<>: Splitting a job into multiple threads where each thread is responsible for a subset of the overall data to be processed. The threads of execution may be within the same JVM or they may span JVMs in a clustered environment that supports workload balancing. - - [[12]]<>: A table that holds temporary data while it is being processed. - - [[13]]<>: - a job that can be executed again and will assume the same identity as when run initially. In othewords, it is has the same job instance id. - - [[14]]Rerunnable - a job that is restartable and manages it's own state in terms of previous run's record processing. Note>>: Rerunnable is tied to the driving query. If the query can be formed so that it will limit the processed rows when the job is restarted than re-runnable = true. Often times a condition is added to the where statement to limit the rows returned by the driving query with something like "and processedFlag != true". - ---------------------------------------------------------------------- -Note: If its false the architecture assumes responsibility for tracking which rows have been processed. There is a default strategy for tracking the last record processed by partition. Most batch jobs only have one partition. The option is only valid for a restartable job. The reason being is that we have to persist the restart data which is only available on a restartable job. - -In DSL it is the following: - StartOver ::= restartable = false. Restartable ::= true | false - If (Restartable) - re-runnable ::= true | false - -We don't persist restart information for a non-restartable job. As you can see, it doesn't make sense. Rerunnable has always confused the best of us. ----------------------------------------------------------------------------- diff --git a/spring-batch-core/src/site/apt/index.apt b/spring-batch-core/src/site/apt/index.apt deleted file mode 100644 index 626f7c58f..000000000 --- a/spring-batch-core/src/site/apt/index.apt +++ /dev/null @@ -1,77 +0,0 @@ - ------ - Spring Batch Core - ------ - Dave Syer - ------ - August 2007 - -Overview of the Spring Batch Core - - The Spring Batch Core Domain consists of an API for launching, - monitoring and managing batch jobs. - -[images/core-domain-overview.png] The Spring Batch Core Domain with -dependencies to infrastructure indicated schematically. - - The figure above shows the central parts of the core domain and its - main touch points with the batch application develepor (<<>> - and <<>>). To launch a job there is a <<>> - interface that can be used to simplify the launching for dumb - clients like JMX or a command line. - - A <<>> is composed of a list of <<>>s, each of which is - executed in turn by the <<>>. The <<>> is a central - strategy in the Spring Batch Core. Implementations of <<>> - are responsible for sharing the work out, but in ways that the - configuration doesn't need to be aware of. For instance, the same - or very similar <<>> configuration might be used in a simple - in-process sequential executor, or in a multi-threaded - implementation, or one that delegates to remote calls to a - distributed system. - -[images/core-domain-extended.png] The Spring Batch Core Domain -extended to include the datababase entities and identifier strategy. - - A <<>> can be re-used to create multiple job - instances and this is reflected in the figure above showing an - extended picture of the core domain. When a <<>> - is launched it first checks to see if a job with - the same <<>> was already executed. We expect one of - the following outcomes, depending on the <<>>: - - * If the job was not previously launched then it can be created - and executed. A new <<>> is created and stored in a - repository (usually a database). A new <<>> is also - created to track the progress of this particular execution. - - * If the job was previously launched and failed the <<>> is - responsible for indicating whether it believes it is restartable - (is a restart legal and expected). There is a flag for this - purpose on the <<>>. If the there was a previous failure - - maybe the operator has fixed some bad input and wants to run it - again - then we might want to restart the previous job. - - If the job was previously launched with teh same - <<>> and completed successfully, then it is an - error to restart it. An ad-hoc request needs to be distinguished - from previous runs by adding a unique job parameter. In either - case a new <<>> is created and stored to monitor - this execution of the <<>>. - -Overview of the Spring Batch Launch Environment - - The diagram below provides an overview of the high level components, technical services, and basic operations required by a batch architecture. This architecture framework is a blueprint that has been proven through decades of implementations on the last several generations of platforms (COBOL/Mainframe, C++/Unix, and now Java/anywhere). Simple Batch provides a physical implementation of the layers, components and technical services commonly found in robust, maintainable systems used to address the creation of simple to complex batch applications, with the infrastructure and extensions to address very complex processing needs. The materials below will walk through the details of the diagram. - -[images/spring-batch-reference-model.png] Simple Batch Launch Environment high level flow and interaction of the architecture. - -* Tiers - - The application style is organized into four logical tiers, which include Run, Job, Application, and Data tiers. The primary goal for organizing an application according to the tiers is to embed what is known as "separation of concerns" within the system. Effective separation of concerns results in reducing the impact of change to the system. - - * <> The Run Tier is concerned with the scheduling and launching of the application. A vendor product is typically used in this tier to allow time-based and interdependent scheduling of batch jobs as well as providing parallel processing capabilities. - - * <> The Job Tier is responsible for the overall execution of a batch job. It sequentially executes batch steps, ensuring that all steps are in the correct state and all appropriate policies are enforced. - - * <> The Application Tier contains components required to execute the program. It contains specific modules that address the required batch functionality and enforces policies around a module execution (e.g., commit intervals, capture of statistics, etc.) - - * <> The Data Tier provides the integration with the physical data sources that might include databases, files, or queues. <>: In some cases the Job tier can be completely missing and in other cases one job script can start several batch job instances. diff --git a/spring-batch-core/src/site/apt/introduction.apt b/spring-batch-core/src/site/apt/introduction.apt deleted file mode 100644 index 44b7a3764..000000000 --- a/spring-batch-core/src/site/apt/introduction.apt +++ /dev/null @@ -1,201 +0,0 @@ - ------ - Batch Processing Strategy - ------ - Scott Wintermute - ------ - May 2007 - -Batch Processing Strategy - - To help design and implement batch systems, basic batch application building blocks and patterns should be provided to the designers and programmers in form of sample structure charts and code shells. When starting to design a batch job, the business logic should be decomposed into a series of steps which can be implemented using the following standard building blocks: - - * Conversion Applications: For each type of file supplied by or generated to an external system, a conversion application will need to be created to convert the transaction records supplied into a standard format required for processing. This type of batch application can partly or entirely consist of translation utility modules (see Basic Batch Services). - - * Validation Applications: Validation applications ensure that all input/output records are correct and consistent. Validation is typically based on file headers and trailers, checksums and validation algorithms as well as record level cross-checks. - - * Extract Applications: An application that reads a set of records from a database or input file, selects records based on predefined rules, and writes the records to an output file. - - * Extract/Update Applications: An application that reads records from a database or an input file, and makes changes to a database or an output file driven by the data found in each input record. - - * Processing and Updating Applications: An application that performs processing on input transactions from an extract or a validation application. The processing will usually involve reading a database to obtain data required for processing, potentially updating the database and creating records for output processing. - - * Output/Format Applications: Applications reading an input file, restructures data from this record according to a standard format, and produces an output file for printing or transmission to another program or system. - - <> - - Additionally a basic application shell should be provided for business logic that cannot be built using the previously mentioned building blocks. - - In addition to the main building blocks, each application may use one or more of standard utility steps, such as: - - * Sort - A Program that reads an input file and produces an output file where records have been re-sequenced according to a sort key field in the records. Sorts are usually performed by standard system utilities. - - * Split - A program that reads a single input file, and writes each record to one of several output files based on a field value. Splits can be tailored or performed by parameter-driven standard system utilities. - - * Merge - A program that reads records from multiple input files and produces one output file with combined data from the input files. Merges can be tailored or performed by parameter-driven standard system utilities. - - Batch applications can additionally be categorized by their input source: - - * Database-driven applications are driven by rows or values retrieved from the database. - - * File-driven applications are driven by records or values retrieved from a file - - The foundation of any batch system is the processing strategy. Factors affecting the selection of the strategy include estimated batch system volume, concurrency with on-line or with another batch systems, available batch windows etc. Also with more enterprises wanting to be up and running 24x7, leaving no obvious batch windows. - - Typical processing options for batch are: - - * Normal processing in a batch window during off-line - - * Concurrent batch / on-line processing - - * Parallel processing of many different batch runs or jobs at the same time - - * Streaming i.e. processing of many instances of the same job at the same time - - * A combination of these - - The order in the list above reflects the implementation complexity, processing in a batch window being the easiest and streaming the most complex to implement. - - Some or all of these options may be supported by a commercial scheduler. - - In the following section these processing options will be discussed in more detail. It is important to notice that the commit and locking strategy adopted by batch processes will be dependent on the type of processing performed and as a rule of thumb, the on-line locking should use the same principles. Therefore a batch architecture cannot be simply an afterthought when designing an overall architecture. - - The locking strategy can use only normal database locks, or an additional custom locking service can be implemented in the architecture. The locking service would track database locking (for example by storing the necessary information in a dedicated db-table) and give or deny permissions to the application programs requesting a db operation. Retry logic could also be implemented by this architecture to avoid aborting a batch job in case of a lock situation. - - <<1. Normal processing in a batch window>> - For simple batch processes running in a separate batch window, where the data being updated is not required by on-line users or other batch processes, concurrency is not an issue and a single commit can be done at the end of the batch run. - - In most cases a more robust approach is more appropriate. A thing to keep in mind is that batch systems have a tendency to grow as time goes by, both in terms of complexity and the data volumes they will handle. If no locking strategy is in place and the system still relies on a single commit point, modifying the batch programs can be painful. Therefore, even with the simplest batch systems, consider the need for commit logic depicted in the [Restart/Recovery section|Restart & Recovery] as well as the information concerning the more complex cases below. - - <<2. Concurrent batch / on-line processing>> - Batch applications processing data that can simultaneously be updated by on-line users, should not lock any data (either in the database or in files) which could be required by on-line users for more than a few seconds. Also updates should be committed to the database at the end of every few transaction. This minimizes the portion of data that is unavailable to other processes and the elapsed time the data is unavailable. - - Another option to minimize physical locking is to have a logical row-level locking implemented using either an Optimistic Locking Pattern or a Pessimistic Locking Pattern. - - * Optimistic locking assumes a low likelihood of record contention. It typically means inserting a timestamp column in each database table used concurrently by both batch and on-line processing. When an application fetches a row for processing, it also fetches the timestamp. As the application then tries to update the processed row, the update uses the original timestamp in the WHERE clause. If the timestamp matches, the data and the timestamp will be updated successfully. If the timestamp does not match, this indicates that another application has updated the same row between the fetch and the update attempt and therefore the update cannot be performed. - - * Pessimistic locking is any locking strategy that assumes there is a high likelihood of record contention and therefore either a physical or logical lock needs to be obtained at retrieval time. One type of pessimistic logical locking uses a dedicated lock-column in the database table. When an application retrieves the row for update, it sets a flag in the lock column. With the flag in place, other applications attempting to retrieve the same row will logically fail. When the application that set the flag updates the row, it also clears the flag, enabling the row to be retrieved by other applications. Please note, that the integrity of data must be maintained also between the initial fetch and the setting of the flag, for example by using db locks (e.g.,SELECT FOR UPDATE). Note also that this method suffers from the same downside as physical locking except that it is somewhat easier to manage building a time-out mechanism that will get the lock released if the user goes to lunch while the record is locked. - - These patterns are not necessarily suitable for batch processing, but they might be used for concurrent batch and on-line processing for example in cases where the database doesn't support row-level locking. As a general rule, optimistic locking is more suitable for on-line applications, while pessimistic locking is more suitable for batch applications. Whenever logical locking is used, the same scheme must be used for all applications accessing data entities protected by logical locks. - - Note that both of these solutions only address locking a single record. Often we may need to lock a logically related group of records. With physical locks, you have to manage these very carefully in order to avoid potential deadlocks. With logical locks, it is usually best to build a logical lock manager that understands the logical record groups you want to protect and can ensure that locks are coherent and non-deadlocking. This logical lock manager usually uses its own tables for lock management, contention reporting, time-out mechanism, etc. - - <<3. Parallel Processing>> - Parallel processing allows multiple batch runs / jobs to run in parallel to minimize the total elapsed batch processing time. This is not a problem as long as the jobs are not sharing the same files, db-tables or index spaces. If they do, this service should be implemented using partitioned data. Another option is to build an architecture module for maintaining interdependencies using a control table. A control table should contain a row for each shared resource and whether it is in use by an application or not. The batch architecture (Control Program Tasklet) or the application in a parallel job would then retrieve information from that table to determine if it can get access to the resource it needs or not. - - If the data access is not a problem, parallel processing can be implemented in a mainframe environment using parallel job classes, in order to ensure adequate CPU time for all the processes. In an environment other than the mainframe, a similar solution can be put in place with for example threads. The solution has to be robust enough to ensure time slices for all the running processes. - - Other key issues in parallel processing include load balancing and the availability of general system resources such as files, database buffer pools etc. Also note that the control table itself can easily become a critical resource. - - <<4. Partitioning>> - Using partitioning allows multiple versions of large batch applications to run in concurrent. The purpose of this is to reduce the elapsed time required to process long batch jobs. Processes which can be successfully partitioned are those where the input file can be split and/or the main database tables partitioned to allow the application to run against different sets of data. - - In addition, processes which are partitioned must be designed to only process their assigned data set. A partitioning architecture has to be closely tied to the database design and the database partitioning strategy. Please note, that the database partitioning doesn't necessarily mean physical partitioning of the database, although in most cases this is advisable. The following picture illustrates the partitioning approach:!app_style_batch_processing.png|align=center! - - The architecture should be flexible enough to allow dynamic configuration of the number of partitions. Both automatic and user controlled configuration should be considered. Automatic configuration may be based on parameters such as the input file size and/or the number of input records. - - <<4.1 Streaming Approaches>> - The following lists some of the possible streaming approaches. Selecting a streaming approach has to be done on a case-by-case basis. - - <1. Fixed and Even Break-Up of Record Set> - - This involves breaking the input record set into an even number of portions (e.g. 10, where each portion will have exactly 1/10th of the entire record set). Each portion is then processed by one instance of the batch/extract application. - - In order to use this approach, preprocessing will be required to split the recordset up. The result of this split will be a lower and upper bound placement number which can be used as input to the batch/extract application in order to restrict its processing to its portion alone. - - Preprocessing could be a large overhead as it has to calculate and determine the bounds of each portion of the record set. - - <2. Breakup by a Key Column> - - This involves breaking up the input record set by a key column such as a location code, and assigning data from each key to a batch instance. In order to achieve this, column values can either be - - <3. Assigned to a batch instance via a streaming table (see below for details).> - - <4. Assigned to a batch instance by a portion of the value (e.g. values 0000-0999, 1000 - 1999, etc.)> - - Under option 1, addition of new values will mean a manual reconfiguration of the batch/extract to ensure that the new value is added to a particular instance. - - Under option 2, this will ensure that all values are covered via an instance of the batch job. However, the number of values processed by one instance is dependent on the distribution of column values (i.e. there may be a large number of locations in the 0000-0999 range, and few in the 1000-1999 range). Under this option, the data range should be designed with streaming in mind. - - Under both options, the optimal even distribution of records to batch instances cannot be realized. There is no dynamic configuration of the number of batch instances used. - - <5. Breakup by Views> - - This approach is basically breakup by a key column, but on the database level. It involves breaking up the recordset into views. These views will be used by each instance of the batch application during its processing. The breakup will be done by grouping the data. - - With this option, each instance of a batch application will have to be configured to hit a particular view (instead of the master table). Also, with the addition of new data values, this new group of data will have to be included into a view. There is no dynamic configuration capability, as a change in the number of instances will result in a change to the views. - - <6. Addition of a Processing Indicator> - - This involves the addition of a new column to the input table, which acts as an indicator. As a preprocessing step, all indicators would be marked to non-processed. During the record fetch stage of the batch application, records are read on the condition that that record is marked non-processed, and once they are read (with lock), they are marked processing. When that record is completed, the indicator is updated to either complete or error. Many instances of a batch application can be started without an change, as the additional column ensures that a record is only processed once. - - With this option, I/O on the table increased dynamically. In the case of a updating batch application, this impact is reduced, as a write will have to occur anyway. - - <7. Extract Table to a Flat File> - - This involves the extraction of the table into a file. This file can then be split into multiple segments and used as input to the batch instances. - - With this option, the additional overhead of extracting the table into a file, and splitting it, may cancel out the effect of multi-streaming. Dynamic configuration can be achieved via changing the file splitting script. - - <8. Use of a Hashing Column> - - This scheme involves the addition of a hash column (key/index) to the database tables used to retrieve the driver record. This hash column will have an indicator to determine which instance of the batch application will process this particular row. For example, if there are three batch instances to be started, then an indicator of 'A' will mark that row for processing by instance 1, an indicator of 'B' will mark that row for processing by instance 2, etc. - - The procedure used to retrieve the records would then have an additional WHERE clause to select all rows marked by a particular indicator. The inserts in this table would involve the addition of the marker field, which would be defaulted to one of the instances (e.g. 'A'). - - A simple batch application would be used to update the indicators such as to redistribute the load between the different instances. When a sufficiently large number of new rows have been added, this batch can be run (anytime, except in the batch window) to redistribute the new rows to other instances. - - Additional instances of the batch application only require the running of the batch application as above to redistribute the indicators to cater for a new number of instances. - - - 4.2 Database and Application design Principles - - An architecture that supports multi-streamed applications which run against partitioned database tables using the key column approach, should include a central streaming repository for storing streaming parameters. This provides flexibility and ensures maintainability. The repository will generally consist of a single table known as the streaming table. - - Information stored in the streaming table will be static and in general should be maintained by the DBA. The table should consist of one row of information for each stream of a multi-streamed application. The table should have a similar layout to the following table: - - {center} - || Streaming Table || - | Program ID Code - Stream Number (Logical ID of the stream) - Low Value of the db key column for this stream - High Value of the db key column for this stream | - {center} - - On program start-up the program id and stream number should be passed to the application from the architecture (Control Processing Tasklet). These variables are used to read the streaming table, to determine what range of data the application is to process (if a key column approach is used). In addition the stream number must be used throughout the processing to: - - * Add to the output files/database updates in order for the merge process to work properly - - * Report normal processing to the batch log and any errors that occur during execution to the architecture error handler - - 4.3 Minimizing Deadlocks - When applications run in parallel or streamed, contention in database resources and deadlocks may occur. It is critical that the database design team eliminates potential contention situations as far as possible as part of the database design. - - Also ensure that the database index tables are designed with deadlock prevention and performance in mind. - - Deadlocks or hot spots often occur in administration or architecture tables such as log tables, control tables, lock tables etc.. The implications of these should be taken into account as well. A realistic stress test is crucial for identifying the possible bottlenecks in the architecture. - - To minimize the impact of conflicts on data, the architecture should provide services such as wait-and-retry intervals when attaching to a database or when encountering a deadlock. This means a built-in mechanism to react to certain database return codes and instead of issuing an immediate error handling, waiting a predetermined amount of time and retrying the database operation. - - 4.4 Parameter Passing and Validation - - The streaming architecture should be relatively transparent to application developers. The architecture should perform all tasks associated with running the application in a streamed mode i.e. - - * Retrieve streaming parameters before application start-up - - * Validate streaming parameters before application start-up - - * Pass parameters to application at start-up - - The validation should include checks to ensure that: - - * the application has sufficient streams to cover the whole data range - - * there are no gaps between streams - - If the database is partitioned, some additional validation may be necessary to ensure that a single stream does not span database partitions. - - Also the architecture should take into consideration the consolidation of streams. Key questions include: - - * Must all the streams be finished before going into the next job step? - - * What happens if one of the streams aborts? diff --git a/spring-batch-core/src/site/apt/outline.apt b/spring-batch-core/src/site/apt/outline.apt deleted file mode 100644 index d500ed334..000000000 --- a/spring-batch-core/src/site/apt/outline.apt +++ /dev/null @@ -1,124 +0,0 @@ - ------------------------------------------ - The Spring Batch - Reference Documentation - ---------------------------------------- - Wayne Lund, Waseem Malik, Lucas Ward, Scott Wintermute, - Kerry O'Brien, Tomi Vanek - ------------------------------------------- - May 2007 - -Preface - -*1. {{{./introduction.html}Spring Container Batch Processing}} - - *1.1. Overview - - *1.2 Usage Scenarios - -*2. {{{./overview.html}Architecture Overview}} - - **2.1. Introduction to Architecture Layers - - **2.2. Batch Applications - - **2.3 Container Application layer - - **2.4 Container Support Layer - - **2.5 The Container Core Layer - - **2.6 Using the Spring-batch infrastructure - - *2.6.1 Infrastructure Provided I/O Support - - *2.6.2 Infrastucture Provided Base Services - - *2.7. Batch Execution Container Configurations - - *2.7.1. Single VM Simple Batch Execution Container - One Job, One Step, One Partition - - *2.7.2. Single VM Multi-threaded Batch Execution Container Configuration - One Job, One Step, Multiple Partitions - - *2.7.3 Batch Execution Container Hosted in J2EE Container - managed environment - - -*3. Core Batch Services - - *3.1. Launching Batch Jobs - - *3.2. Mapping Batch Error Codes to Launch Client Error Codes - - *3.2.1. Returning error codes to Enterprise Schedulers with command line interfaces - - *3.2.2. Web Request - returning error codes to "On-Demand Batch Requests" - - *3.3. Job Services - - *3.3.1. Step Configuration - - *3.3.2. Job Status Service - - *3.3.3. Job Status - - *3.3.4. Job Statistics - - *3.4. Step Services - - *3.4.1. Step Execution - - *3.4.2. Restart Services - - *3.4.3. Skip Services - - *3.4.5. Step Statistics - - *3.5. Data Providers - Operations, Templates and Convenience Callbacks - - *3.5.1. Wrapping input sources - - *3.5.2. Validation of input - - *3.5.3. Delimited File Data Providers - - *3.5.4. Fixed Position File Data Providers - - *3.5.5. XML File Data Providers - - *3.5.6. SQL Input Source Data Provider - - *3.6. Transaction Management - - *3.6.1. Transaction Synchronization with non-transactional resources - - *3.7. Partitioning Batch Jobs - - *3.7.1. Partitioning Strategies - - *3.7.2. Partitioning Job Steps - - *3.7.3. Partition Status - - *3.7.4. Partition Statistics - - *3.7.5. Handling Exceptions within partitions - -*4. [Batch in a J2EE Container] - -*5. [Testing Batch Jobs] - - *5.1. Unit Testing & Mock Objects Provided by the Framework - - *5.2. Integration Testing - - *5.3. Performance Testing Batch Jobs - -*6. {{{samples.html}Practical Examples for Spring Batch}} - - *6.1. Sample Applications|Spring Reference-Application Job-Map - - *6.2. Running the Sample Batch Applications - -*7. [INCUB:Batch XML Schema] - -*8. {{{./glossary.html}Glossary}} - - diff --git a/spring-batch-core/src/site/apt/overview.apt b/spring-batch-core/src/site/apt/overview.apt deleted file mode 100644 index 2edcc8b03..000000000 --- a/spring-batch-core/src/site/apt/overview.apt +++ /dev/null @@ -1,145 +0,0 @@ - ------ - Architecture Overview - ------ - Wayne Lund - ------ - May 2007 - -2. Architecture Overview - - -*2.1 Introduction - - This chapter covers the overall spring batch architecture. The Spring Container Archtiecture is made up of five logical layers; 1) the Batch Application, 2) the Batch Application Layer, 3) the batch core layer, and 4) the batch infrastucture layer. - -*----------*----------------*------------+ -|Provided By | Layer | Description -*----------*----------------*------------* -| Application Developer | Batch Application | This is where the application writes their batch jobs and modules. | -*----------*----------------*------------* -| Spring Batch Execution Container | Container Application Layer | Allows for extending and overwriting of the batch support layer for custom requirements. Facilities implemented in this layer could migrate down to Batch Support Layer. This is also the layer to add the project specific jars required by job types (e.g. reporting jars like Crystal, Brio, etc, form generation jars like Central Pro or Adobe, etc). | -*----------*----------------*------------* -| Spring Batch Execution Container | Container Support Layer | Provides default implementations of batch core services including I/O, Restart, Partitioning, Statistics, and configurations | -*----------*----------------*------------* -| Spring Batch Execution Container | Container Core Layer | Enables configuration, Common Services & Interfaces, management | -*----------*----------------*------------* -| Spring Batch Infrastructure | Batch-Infrastructure | Provides IO support, Batch style transactions, advanced exception handling, batch-template, batch-retry | -*----------*----------------*------------* - - [Figure 2.0] - Batch Architecture Layers - - The batch architecture is modeled after a container architecture, meaning that there are managed resources essential to high performance batch architectures that are configured through a spring context. The following sections will provide a quick review of each layer and their role in the batch architecture. - -*2.2 Batch Applications - -*2.3 Container Application Layer - -*2.4 Container Support Layer - - The batch support layer provides default implementations for all interfaces, interceptors, advice and other core batch services. Figure 2.3.1 illustrates the following logical packages. !Batch Support.png! -Although physically they break out into many more than depicted, logically you can think of the groupings in the following manner: -* I/O Support packages -* Restart Support -* Lifecycle Support packages -* DAO support layer - - **2.4.1 I/O Support Packages - - The I/O related packages are currently the richest packages in the batch architecture. They are modeled after Spring Patterns of Operations and Templates. For example, you'll see FlatFileInputOperations accompanied with a FlatFileInputTemplate. The FlatFileInputTemplate is wired up with a File Descriptor, which contains a Record Descriptor along with various other properties. With the File and Record Descriptors the InputTemplate supports a callback method that allows for the mapping of a record into an object. This support applies to fixed length records, delimited records and XML records. To further simplify this a DefaultFlatFileDataProvider is supplied an input template, which contains the field and record descriptions, along with a line mapper that knows how to map the line to an object. The next() operation on a record simply needs to readAndMap(lineMapper) a record. This pattern is used over again for XML and SQL input for simple mapping of input records to objects. - - In addition to declarative descriptions of the records that can be re-used by multiple batch jobs, the I/O facilities also support configurable validation strategies. The two currently supported are Apache Commons Validator and Spring's VALang. - - **2.4.2 Restart Support - - The Restart Support provides implementations for a few common restart strategies that will be discussed further in the respective section. The following are provided out-of-the-box: - * IDList Restart Strategy - a strategy that supports a batch application where the application does not have a "process" flag and needs the batch architecture to track which records have been processed. This is not the ideal scenario. - * Last Processed Restart Strategy - when the record can be identified through a where and order by only the last record(s) processed needs to be saved for restart. - * No Restart Strategy - some batch jobs simply can't support restart. When they are re-run they are considered to be a new instance of a batch job. - * Sql Restart Strategy - \[need some additional javadoc for this strategy\]. - - **2.4.3 Lifecycle Support - -*2.5. The Container Core Layer - - The Batch Core interfaces and services are illiustrated in a simplied view of a package diagram. There are roughly seven logical packages: - * Core Spring Extensions - * Core Batch Advice - * Core Batch Configuration - * Core Batch Repository - * Core Batch Tasklet - \\ !Batch Core.png! - [Figure 2.5] Batch Core Layer - - In the actual physical packaging there are a few more packages but the above illistration serves as an overview of the logical services that the batch container provides. The following sections will provide an introduction into each set of core batch facilities. - - **2.5.1 Core Spring Extensions - - The Core Spring extensions provide the scaffolding for a batch container. This includes facilities for managing the batch architecture in terms of launching, suspending and stopping batch jobs. There is house keeping that goes on, especially in concurrent batch jobs, related to ensuring that batch jobs quiese properly. The lifecycle management provides services for the proper initialization and subsequent shutdown of batch resources and services. The batch architecture is flexible in terms of how batch jobs may be launched. For example, batch jobs can be started via JMX facilities, scripts from the command line that launch a Java VM. It can also support launching batch jobs through web services or http. There are no restrictions. Finally, there are standard batch error codes. These error codes can be exposed to external utilities, like Schedulers, to ensure that batch jobs expose the status of jobs to an operational environment. This is especially important in the batch context where the modus operandi is headless, meaning unattended operation. - - **2.5.2 Core Batch Advice - - Core Batch Advice is an inventory of the type of advice that batch architectures will inject during the runtime of a batch application. These are defined as a set of extensible interfaces, with a number of default implementations in the support layer that provide some of the most common types of advice. Partition Advice is helpful with large datasets that need to be "chunked" up and run concurrently for better through put. Resource Advice is helpful for registering interest in transactional information so that file locations can be kept in sync with information processed within a transaction. In addition, the resource is associated with the correct step context and its associated configuration properties. Skip advice is applied for records that the module is unable to process. Restart Advice is helpful for Restartable jobs where for advising the job on how to restart. There is considerable variability on how restart can occur. For example, a job may be marking records as "processed" and the restart advice will advise the process with query that restarts the job at the last successfully processed record. Finally, Statistics are vital in operational environments to report on records processed, records skipped and total number of records read. In addition, certain batch jobs lend themselves to custom reporting to expose additional business level information like the number of trades processed or cases opened, etc. - - **2.5.3 Core Batch Configuration - - Batch configuration is considerably different from online web applications or SOA based applications. The Core Batch Configuration provides a place for configuring runtime properties related to the batch application style. This includes the ability to add Commit Policy. In a batch style application it is often advantageous to keep the commit interval as high as possible when processing Logical Units of Work. Whereas in an online web application with declarative transaction the transaction scope would be at the entrance to a business service, a batch transaction scope may include many logical units of work before a transaction commit is executed. A Start Policy allows a configuration to tell the batch job whether it is Restartable, and if so, what type of restart to initiate. Some jobs are not restartable and care should be taken to ensure that information is not applied multiple times when the business rules do not allow for it. Exception policies deal with what to do when exceptions occur. This impacts logging policies and exception handling. The architecture defines a common set of exceptions that projects can apply handlers to like processing errors, validation errors, parsing errors, missing configuration parameters, etc. - - **2.5.4 Container Repository - - This is an internal package for storing the state of a batch job and any associated partition and step status. - - **2.5.5 Core Batch Tasklet - - The core batch module is where control is handed off to the application. There are a number of patterns that have been observed in processing batch data. Spring Core Batch Tasklet implements the most common patterns and provides and extension point for additional Tasklet processing implementations. The basic idea of module provides the facilities for reading and processing data. The simplest implementation of Tasklet, the ReadProcessTasklet, handles both the input and output of data within one class. An alternative implementation, the DataProviderProcessTasklet, provides functionality for 'split processing'. This type of processing is characterized by separating the reading and processing of batch data into two seperate classes: DataProvider and TaskletProcessor. The DataProvider class provides a solid means for reusablility and enforces good architecture practices. Because an object \*must\* be returned by the DataProider to continue processing, (Returning null indicates processing should end) a developer is forced to read in all relevant data, place it into domain or value objects, and return the object. The TaskletProcessor will then use this object within the business logic and final output. - -2.6 Container's Use of batch infrastructure - - **2.6.1 Infrastructure Provided I/O - - The I/O core interfaces and implementations provide facilities for simplifying the extraction of data from I/O sources like files and database tables. The key concepts are FieldDescriptors and FieldSets along with appropriate CallBack Handlers. These are modeled after common spring operations and templates like JdbcTemplate. Through the use of LineMappers a developer needs only to describe a record format and write the appropriate callback method that maps the parsed record into an object of their choice. These can either be true POJO objects or Value Objects (structures) that are subsequently available for the module to processs. The interface for Field Descriptors also allows for a level of validation through the use of Spring's VALang or Apache's Common Validator. - - **2.6.2 Core Batch Interceptors & Interceptor Services - - * Batch Operations & Batch Template - - Interceptors and the associated services are the key to how advise is applied in the batch architecture. The interceptors are Point Cuts in the batch lifecycle that allow the injection of advise. The shared lifecycle behavior abstracted through the BatchLifeCycleInterceptor defineds three methods; init, onError and finalize. All subclasses of LifeCycleInterceptor define default behavior for these three methods. The JobLifecycleInterceptor further exposes the methods beforeJob(), beforeStep(), afterJob(), and afterStep() allowing hooks into the lifecycle for specific advise. The Batch Architecture provides default implementations for all lifecycle point cuts, or interception points. The Tasklet Interceptor, in addition to the standard lifecycle methods, implements logic around beforeLuw(), afterLuw(), commitIntervalStarted() and commitIntervalCompleted(). Having well defined lifecycle interception points allows for the easy insertion of custom advice into the batch runtime environment. - -2.7 Batch Esecution Container Configurations - - In addition to core facilities for configuring or wiring together jobs and steps with required resources, policies, and interceptors, spring batch allows considerable flexibility in how scalability is achieved. More options for scalability will be available in the future. The important key for scalability in Java is the recognition that there is a limit to what one JVM may scale up to in terms of number of threads, managed resources, memory configuration, etc. The spring batch architecture allows for the configuration of simple batch jobs where one VM and one process is sufficient to do perform the work within a batch window all the way through many threads distributed within a cluster of JEE servers. The figure below illistrates the scalability spectrum. - - This is not to be understood as the only way to scale batch jobs as there are many factors. For example, other federated java architectures hold potential like Teracotta or Gigaspaces although there is no current implementation for these distributed models in the current batch architecture. - !scalability-model.png! - [Figure 2.3.1] - Scalability Model - -*2.7.1. Single VM Simple Batch Execution Container - One Job, One Step, One Partition - - The simplest configuration is one job with with step and hence, one implied partition. Implied means that there is nothing for the developer to consider because the default number of partitions is one. There is typically one input source and one output source in this simple configuration. See the Simple Tasklet Job for an example of what this configuration looks like. A simple configuration still typically configures a datasource context, the batch configuration for describing the Job, Step, along with the associated configured policies, field descriptors, and line mappers. !SimpleTradeConfiguration.jpg! - [Figure 2.3.1] Simple Container Configuration - - The details of this configuration will be covered thoroughly in subsequent sections of the document but for now it should be understood that Job, the Step, the input template, the file descriptor with its associated line mapper, and the output (e.g. the TradeWriter). - -*2.3.2. Single VM Multi-threaded Batch Execution Container Configuration - One Job, One Step, Multiple Partitions - - In a Single JVM using partitioning a multi-threaded execution is supported. \[This is still work in progress\] - -*2.3.3. Batch Execution Container Hosted in J2EE Container - managed environment - - The J2EE container model has fallen under fire over the past few years for many valid reasons. There are some things that the J2EE container do very well though that projects should consider when planning for scalability with batch architectures. Commercial and open source containers like WebSphere, BEA and JBOSS typically: - - * manage datasources effectively along with attendent services like prepared statement caching. - - * manage transactions effectively including many configurable properties for long lived transactions. - - * manage thread pools more effectively. - - * supply robust implementations of JTA, a requirement when batch jobs output to multiple XA resources like JMS and JDBC. - - * manage distribution effectively including domains, clusters and cells - - * provide robust JMX management for configuring, managing and administering distributed applications. - - * workload management facilities (clusters) provided by J2EE vendors - - Projects are encouraged to deploy batch applications with the simplest configuration possible, but when federated JVMs are a requirement to process volumes of data within a batch window, batch-in-container provides an effective way of distributing the processing. Spring Batch supports this through a simple change in configuration. \[Work in progress on the exact implementation - being released as part of M2\]. - diff --git a/spring-batch-core/src/site/resources/images/core-domain-extended.png b/spring-batch-core/src/site/resources/images/core-domain-extended.png deleted file mode 100644 index 4ac1358c4..000000000 Binary files a/spring-batch-core/src/site/resources/images/core-domain-extended.png and /dev/null differ diff --git a/spring-batch-core/src/site/resources/images/core-domain-overview.png b/spring-batch-core/src/site/resources/images/core-domain-overview.png deleted file mode 100644 index ced0330ab..000000000 Binary files a/spring-batch-core/src/site/resources/images/core-domain-overview.png and /dev/null differ diff --git a/spring-batch-core/src/site/resources/images/spring-batch-reference-model.png b/spring-batch-core/src/site/resources/images/spring-batch-reference-model.png deleted file mode 100644 index 39d963a75..000000000 Binary files a/spring-batch-core/src/site/resources/images/spring-batch-reference-model.png and /dev/null differ diff --git a/spring-batch-core/src/site/site.xml b/spring-batch-core/src/site/site.xml deleted file mode 100644 index b0d91e7f6..000000000 --- a/spring-batch-core/src/site/site.xml +++ /dev/null @@ -1,19 +0,0 @@ - - - - Spring Batch: ${project.name} - - - - - - - - - - - - - - - diff --git a/spring-batch-core/src/test/java/test/jdbc/datasource/DataSourceInitializer.java b/spring-batch-core/src/test/java/test/jdbc/datasource/DataSourceInitializer.java index 103104c4b..ad6b62260 100644 --- a/spring-batch-core/src/test/java/test/jdbc/datasource/DataSourceInitializer.java +++ b/spring-batch-core/src/test/java/test/jdbc/datasource/DataSourceInitializer.java @@ -16,11 +16,6 @@ package test.jdbc.datasource; -import java.io.IOException; -import java.util.List; - -import javax.sql.DataSource; - import org.apache.commons.io.IOUtils; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; @@ -38,9 +33,13 @@ import org.springframework.util.Assert; import org.springframework.util.ClassUtils; import org.springframework.util.StringUtils; +import javax.sql.DataSource; +import java.io.IOException; +import java.util.List; + /** * Wrapper for a {@link DataSource} that can run scripts on start up and shut - * down. Us as a bean definition

    + * down. Us as a bean definition

    * * Run this class to initialize a database in a running server process. * Make sure the server is running first by launching the "hsql-server" from the diff --git a/spring-batch-core/template.mf b/spring-batch-core/template.mf deleted file mode 100644 index 729519bb9..000000000 --- a/spring-batch-core/template.mf +++ /dev/null @@ -1,32 +0,0 @@ -Manifest-Version: 1.0 -Bundle-SymbolicName: org.springframework.batch.core -Bundle-Name: Spring Batch Core -Bundle-Vendor: Spring -Bundle-Version: ${version} -Bundle-ManifestVersion: 2 -Ignored-Existing-Headers: - Import-Package, - Export-Package -Import-Template: - com.thoughtworks.xstream.*;version="[1.3,1.4)";resolution:=optional, - org.codehaus.jettison.*;version="[1.0,1.1)";resolution:=optional, - org.aopalliance.*;version="[1.0.0, 2.0.0)", - org.aspectj.*;version="[1.5.2,1.7.0)";resolution:=optional, - org.apache.commons.logging.*;version="[1.0.4, 2.0.0)", - org.springframework.batch.*;version="[2.2.0, 3.0.0)";resolution:=optional, - org.springframework.aop.*;version="[3.1.2, 4.0.0)", - org.springframework.beans.*;version="[3.1.2, 4.0.0)", - org.springframework.context.*;version="[3.1.2, 4.0.0)", - org.springframework.core.*;version="[3.1.2, 4.0.0)", - org.springframework.dao.*;version="[3.1.2, 4.0.0)";resolution:=optional, - org.springframework.jdbc.*;version="[3.1.2, 4.0.0)";resolution:=optional, - org.springframework.transaction.*;version="[3.1.2, 4.0.0)";resolution:=optional, - org.springframework.util.*;version="[3.1.2, 4.0.0)";resolution:=optional, - org.springframework.stereotype.*;version="[3.1.2, 4.0.0)";resolution:=optional, - org.springframework.retry.*;version="[1.0.0,2.0.0)";resolution:=optional, - org.springframework.classify.*;version="[1.0.0,2.0.0)";resolution:=optional, - org.springframework.osgi.*;version="[1.1.0, 2.0.0)";resolution:=optional, - org.osgi.framework;version="0";resolution:=optional, - org.w3c.dom;version="0";resolution:=optional, - javax.annotation.*;version="0";resolution:=optional, - javax.sql.*;version="0";resolution:=optional diff --git a/spring-batch-infrastructure-tests/pom.xml b/spring-batch-infrastructure-tests/pom.xml deleted file mode 100644 index 17233922c..000000000 --- a/spring-batch-infrastructure-tests/pom.xml +++ /dev/null @@ -1,253 +0,0 @@ - - - 4.0.0 - spring-batch-infrastructure-tests - Infrastructure Tests - Integration tests for the Spring Batch Infrastructure - - org.springframework.batch - spring-batch-parent - 3.0.0.BUILD-SNAPSHOT - ../spring-batch-parent - - - - hsql - - - - default - - true - - - - - org.apache.maven.plugins - maven-surefire-plugin - - true - - - - - - - test - - - - org.apache.maven.plugins - maven-surefire-plugin - - false - - - ENVIRONMENT - ${environment} - - - - - - - - - - - org.springframework.batch - spring-batch-infrastructure - 3.0.0.BUILD-SNAPSHOT - - - org.hsqldb - hsqldb - - - commons-io - commons-io - test - - - org.apache.derby - derby - - - org.apache.activemq - activemq-core - 5.1.0 - test - - - camel-core - org.apache.camel - - - commons-logging-api - commons-logging - - - - - junit - junit - - - org.apache.geronimo.specs - geronimo-jms_1.1_spec - - - org.apache.geronimo.specs - geronimo-j2ee-management_1.1_spec - 1.0.1 - test - - - xmlunit - xmlunit - 1.2 - test - - - org.codehaus.castor - castor-xml - 1.3.2 - test - - - stax - stax - - - commons-lang - commons-lang - - - - - org.slf4j - slf4j-log4j12 - true - - - log4j - log4j - test - - - xerces - xercesImpl - 2.8.1 - test - - - com.thoughtworks.xstream - xstream - test - - - org.codehaus.woodstox - woodstox-core-asl - test - - - org.apache.ibatis - ibatis-sqlmap - true - - - commons-dbcp - commons-dbcp - - - commons-lang - commons-lang - 2.5 - test - - - org.hibernate - hibernate-core - true - - - org.hibernate - hibernate-entitymanager - true - - - org.hibernate - hibernate-annotations - true - - - org.apache.geronimo.specs - geronimo-jta_1.1_spec - true - - - org.springframework - spring-oxm - test - - - org.springframework - spring-jdbc - test - - - org.springframework - spring-orm - true - - - org.springframework - spring-jms - true - - - org.springframework - spring-test - test - - - org.springframework - spring-tx - - - org.springframework - spring-aop - - - mysql - mysql-connector-java - 5.1.6 - runtime - - - postgresql - postgresql - 8.3-603.jdbc3 - true - runtime - - - org.mockito - mockito-all - test - - - - - - - org.apache.maven.plugins - maven-surefire-plugin - - junit:junit - - - - - - diff --git a/spring-batch-infrastructure-tests/src/main/java/org/springframework/batch/container/jms/BatchMessageListenerContainer.java b/spring-batch-infrastructure-tests/src/main/java/org/springframework/batch/container/jms/BatchMessageListenerContainer.java index e5ce10916..02752a710 100644 --- a/spring-batch-infrastructure-tests/src/main/java/org/springframework/batch/container/jms/BatchMessageListenerContainer.java +++ b/spring-batch-infrastructure-tests/src/main/java/org/springframework/batch/container/jms/BatchMessageListenerContainer.java @@ -16,10 +16,6 @@ package org.springframework.batch.container.jms; -import javax.jms.JMSException; -import javax.jms.MessageConsumer; -import javax.jms.Session; - import org.aopalliance.aop.Advice; import org.springframework.aop.framework.ProxyFactory; import org.springframework.aop.support.DefaultPointcutAdvisor; @@ -30,9 +26,13 @@ import org.springframework.jms.connection.TransactionAwareConnectionFactoryProxy import org.springframework.jms.listener.DefaultMessageListenerContainer; import org.springframework.transaction.interceptor.TransactionInterceptor; +import javax.jms.JMSException; +import javax.jms.MessageConsumer; +import javax.jms.Session; + /** * Message listener container adapted for intercepting the message reception - * with advice provided through configuration.
    + * with advice provided through configuration.
    * * To enable batching of messages in a single transaction, use the * {@link TransactionInterceptor} and the {@link RepeatOperationsInterceptor} in diff --git a/spring-batch-infrastructure-tests/src/site/apt/index.apt b/spring-batch-infrastructure-tests/src/site/apt/index.apt deleted file mode 100644 index 45d636ad3..000000000 --- a/spring-batch-infrastructure-tests/src/site/apt/index.apt +++ /dev/null @@ -1,15 +0,0 @@ - ------ - Spring Batch Integration Tests - ------ - Dave Syer - ------ - March 2008 - -Overview of the Spring Batch Integration Tests - - This module contains integration tests for the Spring Batch Infrastructure module. In the tests we exercise some extended and mostly realistic scenarios using the infrastructure components. - - * Message-pipeline tests. There are a bunch of tests using JMS and RDBMS in the same transaction, exercising various failure and retry scenarios. The basic premise is that throughput in such systems is greatly increased by widening the transactio nboundaries to process more than one message in each transaction. If there is a failure we may want to retry the operation in the next transaction. - - * OXM integration tests. There are also some tests of the XML reader and writers in Spring Batch with more extensive configuration than in the unit tests. - diff --git a/spring-batch-infrastructure-tests/src/site/site.xml b/spring-batch-infrastructure-tests/src/site/site.xml deleted file mode 100644 index 29c288783..000000000 --- a/spring-batch-infrastructure-tests/src/site/site.xml +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - - - - - - - - - - - diff --git a/spring-batch-infrastructure-tests/template.mf b/spring-batch-infrastructure-tests/template.mf deleted file mode 100755 index 2d2b26bfa..000000000 --- a/spring-batch-infrastructure-tests/template.mf +++ /dev/null @@ -1,11 +0,0 @@ -Manifest-Version: 1.0 -Bundle-SymbolicName: org.springframework.batch.infrastructure.tests -Bundle-Name: Spring Batch Infrastructure Tests -Bundle-Vendor: Spring -Bundle-Version: ${version} -Bundle-ManifestVersion: 2 -Ignored-Existing-Headers: - Import-Package, - Export-Package -Import-Template: - *;version="0" diff --git a/spring-batch-infrastructure/pom.xml b/spring-batch-infrastructure/pom.xml deleted file mode 100644 index 2d4674365..000000000 --- a/spring-batch-infrastructure/pom.xml +++ /dev/null @@ -1,273 +0,0 @@ - - - 4.0.0 - spring-batch-infrastructure - jar - Infrastructure - - - http://docs.spring.io/spring-batch/${project.artifactId} - - org.springframework.batch - spring-batch-parent - 3.0.0.BUILD-SNAPSHOT - ../spring-batch-parent - - - https://github.com/spring-projects/spring-batch - scm:git:git://github.com/spring-projects/spring-batch.git - scm:git:git://github.com/spring-projects/spring-batch.git - HEAD - - - - - org.apache.maven.plugins - maven-antrun-plugin - - - - - - org.apache.maven.plugins - maven-surefire-plugin - - junit:junit - - - - - - - - junit - junit - - - org.aspectj - aspectjrt - test - - - org.aspectj - aspectjweaver - test - - - cglib - cglib-nodep - true - - - org.apache.geronimo.specs - geronimo-jms_1.1_spec - true - - - org.slf4j - slf4j-log4j12 - true - - - log4j - log4j - test - - - commons-io - commons-io - test - - - commons-dbcp - commons-dbcp - test - - - org.codehaus.jackson - jackson-mapper-asl - 1.0.1 - true - - - org.hsqldb - hsqldb - test - - - com.h2database - h2 - test - - - org.xerial - sqlite-jdbc - test - - - org.apache.derby - derby - test - - - org.hibernate - hibernate-core - true - - - org.hibernate - hibernate-entitymanager - true - - - org.hibernate - hibernate-annotations - true - - - org.hibernate - hibernate-validator - true - - - org.apache.geronimo.specs - geronimo-jta_1.1_spec - true - - - org.apache.ibatis - ibatis-sqlmap - true - - - javax.mail - mail - 1.4 - true - - - javax.batch - javax.batch-api - provided - true - - - org.springframework - spring-oxm - true - - - org.springframework - spring-core - - - org.springframework - spring-aop - true - - - org.springframework - spring-context - true - - - org.springframework - spring-context-support - true - - - org.springframework - spring-jdbc - true - - - org.springframework - spring-jms - true - - - org.springframework - spring-orm - true - - - org.springframework.retry - spring-retry - - - org.springframework - spring-test - - - org.springframework - spring-tx - true - - - org.springframework.data - spring-data-commons - true - - - org.springframework.data - spring-data-mongodb - true - - - org.springframework.data - spring-data-neo4j - true - - - org.springframework.data - spring-data-gemfire - true - - - org.codehaus.woodstox - woodstox-core-asl - true - - - org.springframework.amqp - spring-amqp - true - - - org.springframework.amqp - spring-rabbit - true - - - org.springframework.ldap - spring-ldap-core - true - - - org.springframework.ldap - spring-ldap-core-tiger - true - - - org.springframework.ldap - spring-ldap-ldif-core - true - - - org.mockito - mockito-all - test - - - - - - org.codehaus.mojo - emma-maven-plugin - 1.0-alpha-1 - - - - diff --git a/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/ItemReader.java b/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/ItemReader.java index f03d25294..a96eff109 100644 --- a/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/ItemReader.java +++ b/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/ItemReader.java @@ -17,14 +17,14 @@ package org.springframework.batch.item; /** - * Strategy interface for providing the data.
    + * Strategy interface for providing the data.
    * * Implementations are expected to be stateful and will be called multiple times * for each batch, with each call to {@link #read()} returning a different value - * and finally returning null when all input data is exhausted.
    + * and finally returning null when all input data is exhausted.
    * * Implementations need not be thread-safe and clients of a {@link ItemReader} - * need to be aware that this is the case.
    + * need to be aware that this is the case.
    * * A richer interface (e.g. with a look ahead or peek) is not feasible because * we need to support transactions in an asynchronous batch. diff --git a/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/data/AbstractPaginatedDataItemReader.java b/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/data/AbstractPaginatedDataItemReader.java index f071446e7..1b0f374c7 100644 --- a/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/data/AbstractPaginatedDataItemReader.java +++ b/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/data/AbstractPaginatedDataItemReader.java @@ -15,12 +15,12 @@ */ package org.springframework.batch.item.data; -import java.util.Iterator; - import org.springframework.batch.item.ItemReader; import org.springframework.batch.item.ItemStreamReader; import org.springframework.batch.item.support.AbstractItemCountingItemStreamItemReader; +import java.util.Iterator; + /** * A base class that handles basic reading logic based on the paginated * semantics of Spring Data's paginated facilities. It also handles the @@ -80,7 +80,7 @@ AbstractItemCountingItemStreamItemReader { * for the actual work of reading a page. Each time * this method is called, the resulting {@link Iterator} * should contain the items read within the next page. - *

    + *

    * If the {@link Iterator} is empty or null when it is * returned, this {@link ItemReader} will assume that the * input has been exhausted. diff --git a/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/database/ExtendedConnectionDataSourceProxy.java b/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/database/ExtendedConnectionDataSourceProxy.java index 90f9a3c26..78db5b8b3 100644 --- a/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/database/ExtendedConnectionDataSourceProxy.java +++ b/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/database/ExtendedConnectionDataSourceProxy.java @@ -16,6 +16,15 @@ package org.springframework.batch.item.database; +import org.springframework.beans.factory.InitializingBean; +import org.springframework.jdbc.datasource.ConnectionProxy; +import org.springframework.jdbc.datasource.DataSourceUtils; +import org.springframework.jdbc.datasource.SmartDataSource; +import org.springframework.transaction.support.TransactionSynchronizationManager; +import org.springframework.util.Assert; +import org.springframework.util.MethodInvoker; + +import javax.sql.DataSource; import java.io.PrintWriter; import java.lang.reflect.InvocationHandler; import java.lang.reflect.InvocationTargetException; @@ -26,16 +35,6 @@ import java.sql.SQLException; import java.sql.SQLFeatureNotSupportedException; import java.util.logging.Logger; -import javax.sql.DataSource; - -import org.springframework.beans.factory.InitializingBean; -import org.springframework.jdbc.datasource.ConnectionProxy; -import org.springframework.jdbc.datasource.DataSourceUtils; -import org.springframework.jdbc.datasource.SmartDataSource; -import org.springframework.transaction.support.TransactionSynchronizationManager; -import org.springframework.util.Assert; -import org.springframework.util.MethodInvoker; - /** * Implementation of {@link SmartDataSource} that is capable of keeping a single * JDBC Connection which is NOT closed after each use even if @@ -104,7 +103,7 @@ public class ExtendedConnectionDataSourceProxy implements SmartDataSource, Initi } /** - * Constructor that takes as a parameter with the {&link DataSource} to be + * Constructor that takes as a parameter with the {@link DataSource} to be * wrapped. */ public ExtendedConnectionDataSourceProxy(DataSource dataSource) { @@ -112,7 +111,7 @@ public class ExtendedConnectionDataSourceProxy implements SmartDataSource, Initi } /** - * Setter for the {&link DataSource} that is to be wrapped. + * Setter for the {@link DataSource} that is to be wrapped. * * @param dataSource the DataSource */ diff --git a/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/database/HibernateItemWriter.java b/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/database/HibernateItemWriter.java index efee062b1..dcc4491ba 100644 --- a/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/database/HibernateItemWriter.java +++ b/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/database/HibernateItemWriter.java @@ -32,8 +32,8 @@ import org.springframework.util.Assert; * that are not part of the current Hibernate session. It will also flush the * session after writing (i.e. at chunk boundaries if used in a Spring Batch * TaskletStep). It will also clear the session on write - * default (see {@link #setClearSession(boolean) clearSession} property).
    - *
    + * default (see {@link #setClearSession(boolean) clearSession} property).
    + *
    * * The writer is thread-safe once properties are set (normal singleton behavior) * if a {@link CurrentSessionContext} that uses only one session per thread is diff --git a/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/database/IbatisBatchItemWriter.java b/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/database/IbatisBatchItemWriter.java index e2bff3bfa..0d8a22f39 100644 --- a/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/database/IbatisBatchItemWriter.java +++ b/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/database/IbatisBatchItemWriter.java @@ -15,12 +15,10 @@ */ package org.springframework.batch.item.database; -import java.sql.Connection; -import java.sql.SQLException; -import java.util.List; - -import javax.sql.DataSource; - +import com.ibatis.sqlmap.client.SqlMapClient; +import com.ibatis.sqlmap.client.SqlMapSession; +import com.ibatis.sqlmap.engine.execution.BatchException; +import com.ibatis.sqlmap.engine.execution.BatchResult; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.springframework.batch.item.ItemWriter; @@ -35,23 +33,23 @@ import org.springframework.jdbc.support.SQLExceptionTranslator; import org.springframework.jdbc.support.SQLStateSQLExceptionTranslator; import org.springframework.util.Assert; -import com.ibatis.sqlmap.client.SqlMapClient; -import com.ibatis.sqlmap.client.SqlMapSession; -import com.ibatis.sqlmap.engine.execution.BatchException; -import com.ibatis.sqlmap.engine.execution.BatchResult; +import javax.sql.DataSource; +import java.sql.Connection; +import java.sql.SQLException; +import java.util.List; /** * {@link ItemWriter} that uses the batching features from * SqlMapClient to execute a batch of statements for all items - * provided.
    + * provided.
    * * The user must provide an iBATIS statement id that points to the SQL statement defined - * in the iBATIS SqlMap configuration.
    + * in the iBATIS SqlMap configuration.
    * - * It is expected that {@link #write(List)} is called inside a transaction.
    + * It is expected that {@link #write(List)} is called inside a transaction.
    * * The writer is thread-safe after its properties are set (normal singleton - * behavior), so it can be used to write in multiple concurrent transactions.
    + * behavior), so it can be used to write in multiple concurrent transactions.
    * * Note: This reader was refactored as part of Spring Batch 3.0 to use the iBatis * APIs directly instead of using Spring's SqlMapClientTemplate as part of the upgrade to diff --git a/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/database/IbatisPagingItemReader.java b/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/database/IbatisPagingItemReader.java index 6608c3c20..fbf621080 100644 --- a/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/database/IbatisPagingItemReader.java +++ b/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/database/IbatisPagingItemReader.java @@ -16,15 +16,8 @@ package org.springframework.batch.item.database; -import java.sql.Connection; -import java.sql.SQLException; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.concurrent.CopyOnWriteArrayList; - -import javax.sql.DataSource; - +import com.ibatis.sqlmap.client.SqlMapClient; +import com.ibatis.sqlmap.client.SqlMapSession; import org.springframework.batch.item.ExecutionContext; import org.springframework.jdbc.CannotGetJdbcConnectionException; import org.springframework.jdbc.datasource.DataSourceUtils; @@ -35,8 +28,13 @@ import org.springframework.jdbc.support.SQLStateSQLExceptionTranslator; import org.springframework.util.Assert; import org.springframework.util.ClassUtils; -import com.ibatis.sqlmap.client.SqlMapClient; -import com.ibatis.sqlmap.client.SqlMapSession; +import javax.sql.DataSource; +import java.sql.Connection; +import java.sql.SQLException; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.concurrent.CopyOnWriteArrayList; /** *

    @@ -52,7 +50,7 @@ import com.ibatis.sqlmap.client.SqlMapSession; * to current position. Some standard query parameters are provided by the * reader and the SQL in the named query must use some or all of these parameters * (depending on the SQL variant) to construct a result set of the required - * size. The parameters are: + * size. The parameters are:

    *
      *
    • _page: the page number to be read (starting at 0)
    • *
    • _pagesize: the size of the pages, i.e. the number of rows to @@ -60,6 +58,7 @@ import com.ibatis.sqlmap.client.SqlMapSession; *
    • _skiprows: the product of _page and * _pagesize
    • *
    + *

    * Failure to write the correct platform-specific SQL often results in an * infinite loop in the reader because it keeps asking for the next page and * gets the same result set over and over. diff --git a/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/database/JdbcBatchItemWriter.java b/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/database/JdbcBatchItemWriter.java index 95f0252a1..0f1f33390 100644 --- a/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/database/JdbcBatchItemWriter.java +++ b/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/database/JdbcBatchItemWriter.java @@ -15,14 +15,6 @@ */ package org.springframework.batch.item.database; -import java.sql.PreparedStatement; -import java.sql.SQLException; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; - -import javax.sql.DataSource; - import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.springframework.batch.item.ItemWriter; @@ -36,6 +28,13 @@ import org.springframework.jdbc.core.namedparam.NamedParameterJdbcTemplate; import org.springframework.jdbc.core.namedparam.SqlParameterSource; import org.springframework.util.Assert; +import javax.sql.DataSource; +import java.sql.PreparedStatement; +import java.sql.SQLException; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + /** *

    {@link ItemWriter} that uses the batching features from * {@link NamedParameterJdbcTemplate} to execute a batch of statements for all items @@ -47,9 +46,9 @@ import org.springframework.util.Assert; * named parameter support then you should provide a {@link ItemSqlParameterSourceProvider}, * otherwise you should provide a {@link ItemPreparedStatementSetter}. * This callback would be responsible for mapping the item to the parameters needed to - * execute the SQL statement.
    + * execute the SQL statement.
    * - * It is expected that {@link #write(List)} is called inside a transaction.
    + * It is expected that {@link #write(List)} is called inside a transaction.
    * * The writer is thread-safe after its properties are set (normal singleton * behavior), so it can be used to write in multiple concurrent transactions. diff --git a/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/database/JdbcParameterUtils.java b/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/database/JdbcParameterUtils.java index 51553b859..7c6aafe13 100644 --- a/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/database/JdbcParameterUtils.java +++ b/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/database/JdbcParameterUtils.java @@ -36,7 +36,7 @@ public class JdbcParameterUtils { * sql. The character placeholder is not counted if it appears * within a literal, that is, surrounded by single or double quotes. This method will * count traditional placeholders in the form of a question mark ('?') as well as - * named parameters indicated with a leading ':' or '&'. + * named parameters indicated with a leading ':' or '&'. * * The code for this method is taken from an early version of the * {@link org.springframework.jdbc.core.namedparam.NamedParameterUtils} diff --git a/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/database/JpaItemWriter.java b/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/database/JpaItemWriter.java index 2f81aa482..d58f129fc 100644 --- a/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/database/JpaItemWriter.java +++ b/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/database/JpaItemWriter.java @@ -16,11 +16,6 @@ package org.springframework.batch.item.database; -import java.util.List; - -import javax.persistence.EntityManager; -import javax.persistence.EntityManagerFactory; - import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.springframework.batch.item.ItemWriter; @@ -29,12 +24,16 @@ import org.springframework.dao.DataAccessResourceFailureException; import org.springframework.orm.jpa.EntityManagerFactoryUtils; import org.springframework.util.Assert; +import javax.persistence.EntityManager; +import javax.persistence.EntityManagerFactory; +import java.util.List; + /** * {@link org.springframework.batch.item.ItemWriter} that is using a JPA * EntityManagerFactory to merge any Entities that aren't part of the * persistence context. * - * It is required that {@link #write(List)} is called inside a transaction.
    + * It is required that {@link #write(List)} is called inside a transaction.
    * * The reader must be configured with an * {@link javax.persistence.EntityManagerFactory} that is capable of diff --git a/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/database/support/AbstractSqlPagingQueryProvider.java b/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/database/support/AbstractSqlPagingQueryProvider.java index eb090fd5a..c195cd993 100644 --- a/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/database/support/AbstractSqlPagingQueryProvider.java +++ b/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/database/support/AbstractSqlPagingQueryProvider.java @@ -16,13 +16,6 @@ package org.springframework.batch.item.database.support; -import java.util.ArrayList; -import java.util.LinkedHashMap; -import java.util.List; -import java.util.Map; - -import javax.sql.DataSource; - import org.springframework.batch.item.database.JdbcParameterUtils; import org.springframework.batch.item.database.Order; import org.springframework.batch.item.database.PagingQueryProvider; @@ -30,6 +23,12 @@ import org.springframework.dao.InvalidDataAccessApiUsageException; import org.springframework.util.Assert; import org.springframework.util.StringUtils; +import javax.sql.DataSource; +import java.util.ArrayList; +import java.util.LinkedHashMap; +import java.util.List; +import java.util.Map; + /** * Abstract SQL Paging Query Provider to serve as a base class for all provided * SQL paging query providers. @@ -147,7 +146,7 @@ public abstract class AbstractSqlPagingQueryProvider implements PagingQueryProvi } /** - * A Map of sort columns as the key and boolean for ascending/descending (ascending = true). + * A Map<String, Boolean> of sort columns as the key and boolean for ascending/descending (ascending = true). * * @return sortKey key to use to sort and limit page content */ diff --git a/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/database/support/ColumnMapItemPreparedStatementSetter.java b/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/database/support/ColumnMapItemPreparedStatementSetter.java index 6cb7d9815..b7504f80f 100644 --- a/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/database/support/ColumnMapItemPreparedStatementSetter.java +++ b/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/database/support/ColumnMapItemPreparedStatementSetter.java @@ -16,18 +16,18 @@ package org.springframework.batch.item.database.support; -import java.sql.PreparedStatement; -import java.sql.SQLException; -import java.util.Map; - import org.springframework.batch.item.database.ItemPreparedStatementSetter; import org.springframework.jdbc.core.ColumnMapRowMapper; import org.springframework.jdbc.core.SqlTypeValue; import org.springframework.jdbc.core.StatementCreatorUtils; import org.springframework.util.Assert; +import java.sql.PreparedStatement; +import java.sql.SQLException; +import java.util.Map; + /** - *

    Implementation of the {@link ItemPreparedStatementSetter} interface that assumes all + *

    Implementation of the {@link ItemPreparedStatementSetter} interface that assumes all * keys are contained within a {@link Map} with the column name as the key. It assumes nothing * about ordering, and assumes that the order the entry set can be iterated over is the same as * the PreparedStatement should be set.

    diff --git a/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/file/FlatFileItemWriter.java b/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/file/FlatFileItemWriter.java index a0eca4936..74fabc421 100644 --- a/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/file/FlatFileItemWriter.java +++ b/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/file/FlatFileItemWriter.java @@ -16,16 +16,6 @@ package org.springframework.batch.item.file; -import java.io.BufferedWriter; -import java.io.File; -import java.io.FileOutputStream; -import java.io.IOException; -import java.io.Writer; -import java.nio.channels.Channels; -import java.nio.channels.FileChannel; -import java.nio.charset.UnsupportedCharsetException; -import java.util.List; - import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.springframework.batch.item.ExecutionContext; @@ -42,12 +32,22 @@ import org.springframework.core.io.Resource; import org.springframework.util.Assert; import org.springframework.util.ClassUtils; +import java.io.BufferedWriter; +import java.io.File; +import java.io.FileOutputStream; +import java.io.IOException; +import java.io.Writer; +import java.nio.channels.Channels; +import java.nio.channels.FileChannel; +import java.nio.charset.UnsupportedCharsetException; +import java.util.List; + /** * This class is an item writer that writes data to a file or stream. The writer * also provides restart. The location of the output file is defined by a - * {@link Resource} and must represent a writable file.
    + * {@link Resource} and must represent a writable file.
    * - * Uses buffered writer to improve performance.
    + * Uses buffered writer to improve performance.
    * * The implementation is not thread-safe. * @@ -242,7 +242,7 @@ InitializingBean { * applied and then this method recursively called with the result. If the * input is an array or collection each value will be written to a separate * line (recursively calling this method for each value). If no converter is - * supplied the input object's toString method will be used.
    + * supplied the input object's toString method will be used.
    * * @param items list of items to be written to output stream * @throws Exception if the transformer or file output fail, diff --git a/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/file/ResourcesItemReader.java b/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/file/ResourcesItemReader.java index 31902124e..cca85d187 100644 --- a/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/file/ResourcesItemReader.java +++ b/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/file/ResourcesItemReader.java @@ -15,9 +15,6 @@ */ package org.springframework.batch.item.file; -import java.util.Arrays; -import java.util.concurrent.atomic.AtomicInteger; - import org.springframework.batch.item.ExecutionContext; import org.springframework.batch.item.ItemReader; import org.springframework.batch.item.ItemStreamException; @@ -25,14 +22,17 @@ import org.springframework.batch.item.support.AbstractItemStreamItemReader; import org.springframework.core.io.Resource; import org.springframework.core.io.support.ResourceArrayPropertyEditor; +import java.util.Arrays; +import java.util.concurrent.atomic.AtomicInteger; + /** * {@link ItemReader} which produces {@link Resource} instances from an array. * This can be used conveniently with a configuration entry that injects a * pattern (e.g. mydir/*.txt, which can then be converted by Spring * to an array of Resources by the ApplicationContext. * - *
    - *
    + *
    + *
    * * Thread-safe between calls to {@link #open(ExecutionContext)}. The * {@link ExecutionContext} is not accurate in a multi-threaded environment, so diff --git a/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/file/mapping/BeanWrapperFieldSetMapper.java b/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/file/mapping/BeanWrapperFieldSetMapper.java index ad0474b24..2388f4362 100644 --- a/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/file/mapping/BeanWrapperFieldSetMapper.java +++ b/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/file/mapping/BeanWrapperFieldSetMapper.java @@ -16,15 +16,6 @@ package org.springframework.batch.item.file.mapping; -import java.beans.PropertyEditor; -import java.util.HashMap; -import java.util.HashSet; -import java.util.Map; -import java.util.Properties; -import java.util.Set; -import java.util.concurrent.ConcurrentHashMap; -import java.util.concurrent.ConcurrentMap; - import org.springframework.batch.item.file.transform.FieldSet; import org.springframework.batch.support.DefaultPropertyEditorRegistrar; import org.springframework.beans.BeanWrapperImpl; @@ -41,30 +32,39 @@ import org.springframework.util.ReflectionUtils; import org.springframework.validation.BindException; import org.springframework.validation.DataBinder; +import java.beans.PropertyEditor; +import java.util.HashMap; +import java.util.HashSet; +import java.util.Map; +import java.util.Properties; +import java.util.Set; +import java.util.concurrent.ConcurrentHashMap; +import java.util.concurrent.ConcurrentMap; + /** * {@link FieldSetMapper} implementation based on bean property paths. The * {@link FieldSet} to be mapped should have field name meta data corresponding * to bean property paths in an instance of the desired type. The instance is * created and initialized either by referring to to a prototype object by bean * name in the enclosing BeanFactory, or by providing a class to instantiate - * reflectively.
    - *
    + * reflectively.
    + *
    * * Nested property paths, including indexed properties in maps and collections, * can be referenced by the {@link FieldSet} names. They will be converted to * nested bean properties inside the prototype. The {@link FieldSet} and the * prototype are thus tightly coupled by the fields that are available and those * that can be initialized. If some of the nested properties are optional (e.g. - * collection members) they need to be removed by a post processor.
    - *
    + * collection members) they need to be removed by a post processor.
    + *
    * * To customize the way that {@link FieldSet} values are converted to the * desired type for injecting into the prototype there are several choices. You * can inject {@link PropertyEditor} instances directly through the * {@link #setCustomEditors(Map) customEditors} property, or you can override * the {@link #createBinder(Object)} and {@link #initBinder(DataBinder)} - * methods, or you can provide a custom {@link FieldSet} implementation.
    - *
    + * methods, or you can provide a custom {@link FieldSet} implementation.
    + *
    * * Property name matching is "fuzzy" in the sense that it tolerates close * matches, as long as the match is unique. For instance: @@ -143,7 +143,7 @@ public class BeanWrapperFieldSetMapper extends DefaultPropertyEditorRegistrar /** * Public setter for the type of bean to create instead of using a prototype * bean. An object of this type will be created from its default constructor - * for every call to {@link #mapFieldSet(FieldSet)}.
    + * for every call to {@link #mapFieldSet(FieldSet)}.
    * * Either this property or the prototype bean name must be specified, but * not both. diff --git a/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/file/mapping/PropertyMatches.java b/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/file/mapping/PropertyMatches.java index 6004b136a..f73af3359 100644 --- a/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/file/mapping/PropertyMatches.java +++ b/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/file/mapping/PropertyMatches.java @@ -16,18 +16,18 @@ package org.springframework.batch.item.file.mapping; +import org.springframework.beans.BeanUtils; +import org.springframework.util.ObjectUtils; +import org.springframework.util.StringUtils; + import java.beans.PropertyDescriptor; import java.util.ArrayList; import java.util.Collections; import java.util.List; -import org.springframework.beans.BeanUtils; -import org.springframework.util.ObjectUtils; -import org.springframework.util.StringUtils; - /** * Helper class for calculating bean property matches, according to. - * Used by BeanWrapperImpl to suggest alternatives for an invalid property name.
    + * Used by BeanWrapperImpl to suggest alternatives for an invalid property name.
    * * Copied and slightly modified from Spring core, * diff --git a/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/file/transform/DefaultFieldSet.java b/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/file/transform/DefaultFieldSet.java index abd10785a..6432dd548 100644 --- a/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/file/transform/DefaultFieldSet.java +++ b/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/file/transform/DefaultFieldSet.java @@ -16,6 +16,9 @@ package org.springframework.batch.item.file.transform; +import org.springframework.util.Assert; +import org.springframework.util.StringUtils; + import java.math.BigDecimal; import java.text.DateFormat; import java.text.DecimalFormat; @@ -28,9 +31,6 @@ import java.util.List; import java.util.Locale; import java.util.Properties; -import org.springframework.util.Assert; -import org.springframework.util.StringUtils; - /** * Default implementation of {@link FieldSet} using Java using Java primitive * and standard types and utilities. Strings are trimmed before parsing by @@ -650,7 +650,7 @@ public class DefaultFieldSet implements FieldSet { /** * Read and trim the {@link String} value at 'index'. * - * @returns null if the field value is null. + * @return null if the field value is null. */ protected String readAndTrim(int index) { String value = tokens[index]; diff --git a/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/file/transform/FormatterLineAggregator.java b/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/file/transform/FormatterLineAggregator.java index 063df94dc..8b6f41fa2 100644 --- a/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/file/transform/FormatterLineAggregator.java +++ b/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/file/transform/FormatterLineAggregator.java @@ -23,7 +23,7 @@ import org.springframework.util.Assert; /** * A {@link LineAggregator} implementation which produces a String by - * aggregating the provided item via the {@link Formatter} syntax.
    + * aggregating the provided item via the {@link Formatter} syntax.
    * * @see Formatter * diff --git a/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/file/transform/RangeArrayPropertyEditor.java b/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/file/transform/RangeArrayPropertyEditor.java index 0398b47ab..71bf99a37 100644 --- a/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/file/transform/RangeArrayPropertyEditor.java +++ b/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/file/transform/RangeArrayPropertyEditor.java @@ -16,20 +16,20 @@ package org.springframework.batch.item.file.transform; +import org.springframework.util.Assert; +import org.springframework.util.StringUtils; + import java.beans.PropertyEditorSupport; import java.util.Arrays; import java.util.Comparator; -import org.springframework.util.Assert; -import org.springframework.util.StringUtils; - /** * Property editor implementation which parses string and creates array of - * ranges. Ranges can be provided in any order.
    Input string should be + * ranges. Ranges can be provided in any order.
    Input string should be * provided in following format: 'range1, range2, range3,...' where range is * specified as: *
      - *
    • 'X-Y', where X is minimum value and Y is maximum value (condition X<=Y + *
    • 'X-Y', where X is minimum value and Y is maximum value (condition X<=Y * is verified)
    • *
    • or 'Z', where Z is minimum and maximum is calculated as (minimum of * adjacent range - 1). Maximum of the last range is never calculated. Range @@ -37,8 +37,8 @@ import org.springframework.util.StringUtils; *
    * Minimum and maximum values can be from interval <1, Integer.MAX_VALUE-1> *

    - * Examples:
    - * '1, 15, 25, 38, 55-60' is equal to '1-14, 15-24, 25-37, 38-54, 55-60'
    + * Examples:
    + * '1, 15, 25, 38, 55-60' is equal to '1-14, 15-24, 25-37, 38-54, 55-60'
    * '36, 14, 1-10, 15, 49-57' is equal to '36-48, 14-14, 1-10, 15-35, 49-57' *

    * Property editor also allows to validate whether ranges are disjoint. Validation diff --git a/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/file/transform/RecursiveCollectionLineAggregator.java b/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/file/transform/RecursiveCollectionLineAggregator.java index 4b75752e9..4ab2beab5 100644 --- a/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/file/transform/RecursiveCollectionLineAggregator.java +++ b/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/file/transform/RecursiveCollectionLineAggregator.java @@ -35,7 +35,7 @@ public class RecursiveCollectionLineAggregator implements LineAggregator + * collection and array elements to a String.
    * * @param delegate the line aggregator to set. Defaults to a pass through. */ diff --git a/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/jms/JmsItemReader.java b/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/jms/JmsItemReader.java index ced399ff4..6a29fa7f1 100644 --- a/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/jms/JmsItemReader.java +++ b/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/jms/JmsItemReader.java @@ -16,8 +16,6 @@ package org.springframework.batch.item.jms; -import javax.jms.Message; - import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.springframework.batch.item.ItemReader; @@ -26,11 +24,13 @@ import org.springframework.jms.core.JmsOperations; import org.springframework.jms.core.JmsTemplate; import org.springframework.util.Assert; +import javax.jms.Message; + /** * An {@link ItemReader} for JMS using a {@link JmsTemplate}. The template * should have a default destination, which will be used to provide items in - * {@link #read()}.
    - *
    + * {@link #read()}.
    + *
    * * The implementation is thread-safe after its properties are set (normal * singleton behavior). diff --git a/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/jms/JmsItemWriter.java b/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/jms/JmsItemWriter.java index 1407d42c3..b23ea3bd3 100644 --- a/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/jms/JmsItemWriter.java +++ b/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/jms/JmsItemWriter.java @@ -16,8 +16,6 @@ package org.springframework.batch.item.jms; -import java.util.List; - import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.springframework.batch.item.ItemWriter; @@ -25,11 +23,13 @@ import org.springframework.jms.core.JmsOperations; import org.springframework.jms.core.JmsTemplate; import org.springframework.util.Assert; +import java.util.List; + /** * An {@link ItemWriter} for JMS using a {@link JmsTemplate}. The template * should have a default destination, which will be used to send items in - * {@link #write(List)}.
    - *
    + * {@link #write(List)}.
    + *
    * * The implementation is thread-safe after its properties are set (normal * singleton behavior). diff --git a/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/support/CompositeItemProcessor.java b/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/support/CompositeItemProcessor.java index c1f9d57d4..c2ce4717b 100644 --- a/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/support/CompositeItemProcessor.java +++ b/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/support/CompositeItemProcessor.java @@ -16,17 +16,17 @@ package org.springframework.batch.item.support; -import java.util.List; - import org.springframework.batch.item.ItemProcessor; import org.springframework.beans.factory.InitializingBean; import org.springframework.util.Assert; +import java.util.List; + /** * Composite {@link ItemProcessor} that passes the item through a sequence of * injected ItemTransformers (return value of previous - * transformation is the entry value of the next).
    - *
    + * transformation is the entry value of the next).
    + *
    * * Note the user is responsible for injecting a chain of {@link ItemProcessor}s * that conforms to declared input and output types. diff --git a/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/support/CompositeItemWriter.java b/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/support/CompositeItemWriter.java index 13db29cc2..d0c874401 100644 --- a/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/support/CompositeItemWriter.java +++ b/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/support/CompositeItemWriter.java @@ -16,8 +16,6 @@ package org.springframework.batch.item.support; -import java.util.List; - import org.springframework.batch.item.ExecutionContext; import org.springframework.batch.item.ItemStream; import org.springframework.batch.item.ItemStreamException; @@ -26,9 +24,11 @@ import org.springframework.batch.item.ItemWriter; import org.springframework.beans.factory.InitializingBean; import org.springframework.util.Assert; +import java.util.List; + /** - * Calls a collection of {@link ItemWriter}s in fixed-order sequence.
    - *
    + * Calls a collection of {@link ItemWriter}s in fixed-order sequence.
    + *
    * * The implementation is thread-safe if all delegates are thread-safe. * diff --git a/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/xml/StaxUtils.java b/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/xml/StaxUtils.java index 5813d0604..14f9dd4ce 100644 --- a/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/xml/StaxUtils.java +++ b/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/xml/StaxUtils.java @@ -16,26 +16,25 @@ package org.springframework.batch.item.xml; -import java.lang.reflect.Constructor; -import java.lang.reflect.Method; - -import javax.xml.stream.XMLEventReader; -import javax.xml.stream.XMLEventWriter; -import javax.xml.transform.Result; -import javax.xml.transform.Source; - import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.springframework.util.Assert; import org.springframework.util.ClassUtils; +import javax.xml.stream.XMLEventReader; +import javax.xml.stream.XMLEventWriter; +import javax.xml.transform.Result; +import javax.xml.transform.Source; +import java.lang.reflect.Constructor; +import java.lang.reflect.Method; + /** * This class provides a little bit of indirection to avoid ugly conditional object creation. It is unfortunately * a bit redundant assuming a Spring 3.0 environment, but is necessary to work with Spring WS 1.5.x. - *

    + *
    * The returned object determines whether the environment has Spring OXM as included in the Spring 3.x series of relies * or whether it has Spring OXM from Spring WS 1.5x and factories a StaxSource instance appropriately. - *

    + *
    * As the only class state maintained is to cache java reflection metadata, which is thread-safe, this class is thread-safe. * * @author Josh Long diff --git a/spring-batch-infrastructure/src/main/java/org/springframework/batch/repeat/RepeatListener.java b/spring-batch-infrastructure/src/main/java/org/springframework/batch/repeat/RepeatListener.java index 3c42f329c..2dc2c114e 100644 --- a/spring-batch-infrastructure/src/main/java/org/springframework/batch/repeat/RepeatListener.java +++ b/spring-batch-infrastructure/src/main/java/org/springframework/batch/repeat/RepeatListener.java @@ -59,7 +59,7 @@ public interface RepeatListener { /** * Called when a repeat callback fails by throwing an exception. There will * be one call to this method for each exception thrown during a repeat - * operation (e.g. a chunk).
    + * operation (e.g. a chunk).
    * * There is no need to re-throw the exception here - that will be done by * the enclosing framework. diff --git a/spring-batch-infrastructure/src/main/java/org/springframework/batch/repeat/policy/TimeoutTerminationPolicy.java b/spring-batch-infrastructure/src/main/java/org/springframework/batch/repeat/policy/TimeoutTerminationPolicy.java index f6e2ce72c..37daf2c70 100644 --- a/spring-batch-infrastructure/src/main/java/org/springframework/batch/repeat/policy/TimeoutTerminationPolicy.java +++ b/spring-batch-infrastructure/src/main/java/org/springframework/batch/repeat/policy/TimeoutTerminationPolicy.java @@ -22,7 +22,7 @@ import org.springframework.batch.repeat.context.RepeatContextSupport; /** * Termination policy that times out after a fixed period. Allows graceful exit * from a batch if the latest result comes in after the timeout expires (i.e. - * does not throw a timeout exception).
    + * does not throw a timeout exception).
    * * N.B. It may often be the case that the batch governed by this policy will be * transactional, and the transaction might have its own timeout. In this case diff --git a/spring-batch-infrastructure/src/main/java/org/springframework/batch/repeat/support/RepeatTemplate.java b/spring-batch-infrastructure/src/main/java/org/springframework/batch/repeat/support/RepeatTemplate.java index cd330e821..2b6efd763 100644 --- a/spring-batch-infrastructure/src/main/java/org/springframework/batch/repeat/support/RepeatTemplate.java +++ b/spring-batch-infrastructure/src/main/java/org/springframework/batch/repeat/support/RepeatTemplate.java @@ -16,11 +16,6 @@ package org.springframework.batch.repeat.support; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.Collection; -import java.util.List; - import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.springframework.batch.repeat.CompletionPolicy; @@ -35,18 +30,23 @@ import org.springframework.batch.repeat.exception.ExceptionHandler; import org.springframework.batch.repeat.policy.DefaultResultCompletionPolicy; import org.springframework.util.Assert; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collection; +import java.util.List; + /** * Simple implementation and base class for batch templates implementing * {@link RepeatOperations}. Provides a framework including interceptors and * policies. Subclasses just need to provide a method that gets the next result * and one that waits for all the results to be returned from concurrent - * processes or threads.
    + * processes or threads.
    * * N.B. the template accumulates thrown exceptions during the iteration, and * they are all processed together when the main loop ends (i.e. finished * processing the items). Clients that do not want to stop execution when an * exception is thrown can use a specific {@link CompletionPolicy} that does not - * finish when exceptions are received. This is not the default behaviour.
    + * finish when exceptions are received. This is not the default behaviour.
    * * Clients that want to take some business action when an exception is thrown by * the {@link RepeatCallback} can consider using a custom {@link RepeatListener} diff --git a/spring-batch-infrastructure/src/main/java/org/springframework/batch/repeat/support/ResultHolderResultQueue.java b/spring-batch-infrastructure/src/main/java/org/springframework/batch/repeat/support/ResultHolderResultQueue.java index 1aecf4f31..7e8c7faad 100644 --- a/spring-batch-infrastructure/src/main/java/org/springframework/batch/repeat/support/ResultHolderResultQueue.java +++ b/spring-batch-infrastructure/src/main/java/org/springframework/batch/repeat/support/ResultHolderResultQueue.java @@ -16,14 +16,14 @@ package org.springframework.batch.repeat.support; +import org.springframework.batch.repeat.RepeatStatus; + import java.util.Comparator; import java.util.NoSuchElementException; import java.util.concurrent.BlockingQueue; import java.util.concurrent.PriorityBlockingQueue; import java.util.concurrent.Semaphore; -import org.springframework.batch.repeat.RepeatStatus; - /** * An implementation of the {@link ResultQueue} that throttles the number of * expected results, limiting it to a maximum at any given time. @@ -100,8 +100,8 @@ public class ResultHolderResultQueue implements ResultQueue { } /** - * Get the next result as soon as it becomes available.
    - *
    + * Get the next result as soon as it becomes available.
    + *
    * Release result immediately if: *

      *
    • There is a result that is continuable.
    • diff --git a/spring-batch-infrastructure/src/main/java/org/springframework/batch/repeat/support/ResultQueue.java b/spring-batch-infrastructure/src/main/java/org/springframework/batch/repeat/support/ResultQueue.java index c3c83f292..fe3ae97ce 100644 --- a/spring-batch-infrastructure/src/main/java/org/springframework/batch/repeat/support/ResultQueue.java +++ b/spring-batch-infrastructure/src/main/java/org/springframework/batch/repeat/support/ResultQueue.java @@ -16,11 +16,11 @@ package org.springframework.batch.repeat.support; +import org.springframework.core.task.TaskExecutor; + import java.util.NoSuchElementException; import java.util.concurrent.BlockingQueue; -import org.springframework.core.task.TaskExecutor; - /** * Abstraction for queue of {@link ResultHolder} objects. Acts a bit likeT a * {@link BlockingQueue} with the ability to count the number of items it @@ -40,7 +40,7 @@ interface ResultQueue { * for processing in another thread, at which point the master uses this * method to keep track of the number of expected results. It has the * personality of an counter increment, rather than a work queue, which is - * usually managed elsewhere, e.g. by a {@link TaskExecutor}.

      + * usually managed elsewhere, e.g. by a {@link TaskExecutor}.

      * Implementations may choose to block here, if they need to limit the * number or rate of tasks being submitted. * diff --git a/spring-batch-infrastructure/src/main/java/org/springframework/batch/repeat/support/TaskExecutorRepeatTemplate.java b/spring-batch-infrastructure/src/main/java/org/springframework/batch/repeat/support/TaskExecutorRepeatTemplate.java index 7e44514cd..c300cfc8c 100644 --- a/spring-batch-infrastructure/src/main/java/org/springframework/batch/repeat/support/TaskExecutorRepeatTemplate.java +++ b/spring-batch-infrastructure/src/main/java/org/springframework/batch/repeat/support/TaskExecutorRepeatTemplate.java @@ -27,12 +27,12 @@ import org.springframework.util.Assert; /** * Provides {@link RepeatOperations} support including interceptors that can be - * used to modify or monitor the behaviour at run time.
      + * used to modify or monitor the behaviour at run time.
      * * This implementation is sufficient to be used to configure transactional * behaviour for each item by making the {@link RepeatCallback} transactional, * or for the whole batch by making the execute method transactional (but only - * then if the task executor is synchronous).
      + * then if the task executor is synchronous).
      * * This class is thread-safe if its collaborators are thread-safe (interceptors, * terminationPolicy, callback). Normally this will be the case, but clients @@ -41,7 +41,7 @@ import org.springframework.util.Assert; * is wrapped in the execute method must be thread-safe - often it is based on * some form of data source, which itself should be both thread-safe and * transactional (multiple threads could be accessing it at any given time, and - * each thread would have its own transaction).
      + * each thread would have its own transaction).
      * * @author Dave Syer * diff --git a/spring-batch-infrastructure/src/site/apt/changelog.apt b/spring-batch-infrastructure/src/site/apt/changelog.apt deleted file mode 100644 index 7c41b85a2..000000000 --- a/spring-batch-infrastructure/src/site/apt/changelog.apt +++ /dev/null @@ -1,7 +0,0 @@ -Changelog: Spring Batch Infrastructure - -* 1.0-M2 - -** 2007/07/12 - - * No-one uses this file: we should just switch to auto-generated changelogs? diff --git a/spring-batch-infrastructure/src/site/apt/index.apt b/spring-batch-infrastructure/src/site/apt/index.apt deleted file mode 100644 index 1da232bae..000000000 --- a/spring-batch-infrastructure/src/site/apt/index.apt +++ /dev/null @@ -1,57 +0,0 @@ - ------ - Spring Batch Infrastructure - ------ - Dave Syer - ------ - December 2006 - -Introduction - - This module provides framework code for the Spring Batch project. - The core interfaces are <<>>, <<>>, <<>>, - <<>> and <<>>. - - The reader and writer interfaces are implemented in some generic - ways to help users with I/O in a transactional envionment. Spring - Batch provides some file-based (flat file and xml) implementations - and some database implementations. - - The main implementations of the repeat and retry interfaces are - <<>> and <<>>. Example usage: - -+--- -RepeatTemplate template = new RepeatTemplate(); - -template.setCompletionPolicy(new FixedChunkSizeCompletionPolicy(2)); - -template.iterate(new RepeatCallback() { - - public RepeatStatus doInIteration(RepeatContext context) { - // Do stuff in batch... - return RepeatStatus.CONTINUABLE; // Return RepeatStatus.FINISHED to signal exhausted data - } - -}); -+--- - - The callback is executed repeatedly, until the completion policy - determines that the batch should end (in the example, twice). - - The framework provides <<>> for automatic retry of - a business operation. This is independent of the batching support, - but will often be used in conjunction with it. Example usage: - -+--- -RetryTemplate template = new RetryTemplate(); - -template.setRetryPolicy(new TimeoutRetryPolicy(30000L)); - -Object result = template.execute(new RetryCallback() { - - public Object doWithRetry(RetryContext context) { - // Do stuff that might fail, e.g. webservice operation - return result; - } - -}); -+--- diff --git a/spring-batch-infrastructure/src/site/site.xml b/spring-batch-infrastructure/src/site/site.xml deleted file mode 100644 index 372e1dac3..000000000 --- a/spring-batch-infrastructure/src/site/site.xml +++ /dev/null @@ -1,23 +0,0 @@ - - - - - Spring Batch: ${project.name} - index.html - - - - - - - - - - - - - - - - - diff --git a/spring-batch-infrastructure/src/test/java/org/springframework/batch/item/file/FlatFileItemReaderTests.java b/spring-batch-infrastructure/src/test/java/org/springframework/batch/item/file/FlatFileItemReaderTests.java index a875dd940..c9ec45253 100644 --- a/spring-batch-infrastructure/src/test/java/org/springframework/batch/item/file/FlatFileItemReaderTests.java +++ b/spring-batch-infrastructure/src/test/java/org/springframework/batch/item/file/FlatFileItemReaderTests.java @@ -15,15 +15,6 @@ */ package org.springframework.batch.item.file; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertNull; -import static org.junit.Assert.assertTrue; -import static org.junit.Assert.fail; - -import java.io.IOException; -import java.io.InputStream; - import org.junit.Before; import org.junit.Test; import org.springframework.batch.item.ExecutionContext; @@ -38,6 +29,15 @@ import org.springframework.core.io.Resource; import org.springframework.util.ClassUtils; import org.springframework.util.StringUtils; +import java.io.IOException; +import java.io.InputStream; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertNull; +import static org.junit.Assert.assertTrue; +import static org.junit.Assert.fail; + /** * Tests for {@link FlatFileItemReader}. */ @@ -371,7 +371,7 @@ public class FlatFileItemReaderTests { @Test public void testDirectoryResource() throws Exception { - FileSystemResource resource = new FileSystemResource("target/data"); + FileSystemResource resource = new FileSystemResource("build/data"); resource.getFile().mkdirs(); assertTrue(resource.getFile().isDirectory()); reader.setResource(resource); diff --git a/spring-batch-infrastructure/src/test/java/org/springframework/batch/item/file/FlatFileItemWriterTests.java b/spring-batch-infrastructure/src/test/java/org/springframework/batch/item/file/FlatFileItemWriterTests.java index 315689ac3..99f719428 100644 --- a/spring-batch-infrastructure/src/test/java/org/springframework/batch/item/file/FlatFileItemWriterTests.java +++ b/spring-batch-infrastructure/src/test/java/org/springframework/batch/item/file/FlatFileItemWriterTests.java @@ -16,25 +16,6 @@ package org.springframework.batch.item.file; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertNull; -import static org.junit.Assert.assertTrue; -import static org.junit.Assert.fail; - -import java.io.BufferedReader; -import java.io.File; -import java.io.FileInputStream; -import java.io.IOException; -import java.io.InputStreamReader; -import java.io.Writer; -import java.nio.charset.UnsupportedCharsetException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.Collections; -import java.util.List; - import org.junit.After; import org.junit.Before; import org.junit.Test; @@ -52,6 +33,25 @@ import org.springframework.transaction.support.TransactionCallback; import org.springframework.transaction.support.TransactionTemplate; import org.springframework.util.ClassUtils; +import java.io.BufferedReader; +import java.io.File; +import java.io.FileInputStream; +import java.io.IOException; +import java.io.InputStreamReader; +import java.io.Writer; +import java.nio.charset.UnsupportedCharsetException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertNull; +import static org.junit.Assert.assertTrue; +import static org.junit.Assert.fail; + /** * Tests of regular usage for {@link FlatFileItemWriter} Exception cases will be in separate TestCase classes with * different setUp and tearDown methods @@ -524,7 +524,7 @@ public class FlatFileItemWriterTests { public void testOpenWithNonWritableFile() throws Exception { writer = new FlatFileItemWriter(); writer.setLineAggregator(new PassThroughLineAggregator()); - FileSystemResource file = new FileSystemResource("target/no-such-file.foo"); + FileSystemResource file = new FileSystemResource("build/no-such-file.foo"); writer.setResource(file); new File(file.getFile().getParent()).mkdirs(); file.getFile().createNewFile(); @@ -835,7 +835,7 @@ public class FlatFileItemWriterTests { * If append=true a new output file should still be created on the first run (not restart). */ public void testAppendToNotYetExistingFile() throws Exception { - Resource toBeCreated = new FileSystemResource("target/FlatFileItemWriterTests.out"); + Resource toBeCreated = new FileSystemResource("build/FlatFileItemWriterTests.out"); outputFile = toBeCreated.getFile(); //enable easy content reading and auto-delete the file diff --git a/spring-batch-infrastructure/src/test/java/org/springframework/batch/item/file/MultiResourceItemReaderIntegrationTests.java b/spring-batch-infrastructure/src/test/java/org/springframework/batch/item/file/MultiResourceItemReaderIntegrationTests.java index 9fb6d2962..603b8252e 100644 --- a/spring-batch-infrastructure/src/test/java/org/springframework/batch/item/file/MultiResourceItemReaderIntegrationTests.java +++ b/spring-batch-infrastructure/src/test/java/org/springframework/batch/item/file/MultiResourceItemReaderIntegrationTests.java @@ -15,16 +15,6 @@ */ package org.springframework.batch.item.file; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNull; -import static org.junit.Assert.assertSame; -import static org.junit.Assert.assertTrue; -import static org.junit.Assert.fail; - -import java.io.IOException; -import java.io.InputStream; -import java.util.Comparator; - import org.junit.Before; import org.junit.Test; import org.springframework.batch.item.ExecutionContext; @@ -36,6 +26,16 @@ import org.springframework.core.io.FileSystemResource; import org.springframework.core.io.Resource; import org.springframework.test.util.ReflectionTestUtils; +import java.io.IOException; +import java.io.InputStream; +import java.util.Comparator; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNull; +import static org.junit.Assert.assertSame; +import static org.junit.Assert.assertTrue; +import static org.junit.Assert.fail; + /** * Tests for {@link MultiResourceItemReader}. */ @@ -294,7 +294,7 @@ public class MultiResourceItemReaderIntegrationTests { */ @Test public void testDirectoryResources() throws Exception { - FileSystemResource resource = new FileSystemResource("target/data"); + FileSystemResource resource = new FileSystemResource("build/data"); resource.getFile().mkdirs(); assertTrue(resource.getFile().isDirectory()); tested.setResources(new Resource[] { resource }); diff --git a/spring-batch-infrastructure/src/test/java/org/springframework/batch/item/util/FileUtilsTests.java b/spring-batch-infrastructure/src/test/java/org/springframework/batch/item/util/FileUtilsTests.java index 1d8bbe67c..c220c23de 100644 --- a/spring-batch-infrastructure/src/test/java/org/springframework/batch/item/util/FileUtilsTests.java +++ b/spring-batch-infrastructure/src/test/java/org/springframework/batch/item/util/FileUtilsTests.java @@ -15,19 +15,21 @@ */ package org.springframework.batch.item.util; -import java.io.BufferedWriter; -import java.io.File; -import java.io.FileWriter; -import java.io.IOException; - -import static org.junit.Assert.*; - import org.junit.After; import org.junit.Before; import org.junit.Test; import org.springframework.batch.item.ItemStreamException; import org.springframework.util.Assert; +import java.io.BufferedWriter; +import java.io.File; +import java.io.FileWriter; +import java.io.IOException; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertTrue; +import static org.junit.Assert.fail; + /** * Tests for {@link FileUtils} * @@ -35,7 +37,7 @@ import org.springframework.util.Assert; */ public class FileUtilsTests { - private File file = new File("target/FileUtilsTests.tmp"); + private File file = new File("build/FileUtilsTests.tmp"); /** * No restart + file should not be overwritten => file is created if it does diff --git a/spring-batch-infrastructure/src/test/java/org/springframework/batch/item/xml/StaxEventItemReaderTests.java b/spring-batch-infrastructure/src/test/java/org/springframework/batch/item/xml/StaxEventItemReaderTests.java index f066e97f2..c0921475b 100644 --- a/spring-batch-infrastructure/src/test/java/org/springframework/batch/item/xml/StaxEventItemReaderTests.java +++ b/spring-batch-infrastructure/src/test/java/org/springframework/batch/item/xml/StaxEventItemReaderTests.java @@ -15,29 +15,6 @@ */ package org.springframework.batch.item.xml; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertNull; -import static org.junit.Assert.assertTrue; -import static org.junit.Assert.fail; - -import java.io.IOException; -import java.io.InputStream; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; - -import javax.xml.namespace.QName; -import javax.xml.stream.FactoryConfigurationError; -import javax.xml.stream.XMLEventReader; -import javax.xml.stream.XMLInputFactory; -import javax.xml.stream.XMLStreamException; -import javax.xml.stream.events.EndElement; -import javax.xml.stream.events.StartElement; -import javax.xml.stream.events.XMLEvent; -import javax.xml.transform.Source; - import org.junit.Before; import org.junit.Test; import org.springframework.batch.item.ExecutionContext; @@ -53,6 +30,28 @@ import org.springframework.oxm.UnmarshallingFailureException; import org.springframework.oxm.XmlMappingException; import org.springframework.util.ClassUtils; +import javax.xml.namespace.QName; +import javax.xml.stream.FactoryConfigurationError; +import javax.xml.stream.XMLEventReader; +import javax.xml.stream.XMLInputFactory; +import javax.xml.stream.XMLStreamException; +import javax.xml.stream.events.EndElement; +import javax.xml.stream.events.StartElement; +import javax.xml.stream.events.XMLEvent; +import javax.xml.transform.Source; +import java.io.IOException; +import java.io.InputStream; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertNull; +import static org.junit.Assert.assertTrue; +import static org.junit.Assert.fail; + /** * Tests for {@link StaxEventItemReader}. * @@ -515,7 +514,7 @@ public class StaxEventItemReaderTests { @Test public void testDirectoryResource() throws Exception { - FileSystemResource resource = new FileSystemResource("target/data"); + FileSystemResource resource = new FileSystemResource("build/data"); resource.getFile().mkdirs(); assertTrue(resource.getFile().isDirectory()); source.setResource(resource); diff --git a/spring-batch-infrastructure/src/test/java/org/springframework/batch/item/xml/StaxEventItemWriterTests.java b/spring-batch-infrastructure/src/test/java/org/springframework/batch/item/xml/StaxEventItemWriterTests.java index 2cf6be56d..66bf40b4a 100644 --- a/spring-batch-infrastructure/src/test/java/org/springframework/batch/item/xml/StaxEventItemWriterTests.java +++ b/spring-batch-infrastructure/src/test/java/org/springframework/batch/item/xml/StaxEventItemWriterTests.java @@ -15,24 +15,6 @@ */ package org.springframework.batch.item.xml; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertTrue; -import static org.junit.Assert.fail; -import static org.mockito.Mockito.mock; -import static org.mockito.Mockito.when; - -import java.io.File; -import java.io.IOException; -import java.util.Collections; -import java.util.List; - -import javax.xml.bind.annotation.XmlRootElement; -import javax.xml.stream.XMLEventFactory; -import javax.xml.stream.XMLEventWriter; -import javax.xml.stream.XMLStreamException; -import javax.xml.transform.Result; - import org.apache.commons.io.FileUtils; import org.junit.Before; import org.junit.Test; @@ -52,6 +34,23 @@ import org.springframework.util.Assert; import org.springframework.util.ClassUtils; import org.springframework.util.StringUtils; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.stream.XMLEventFactory; +import javax.xml.stream.XMLEventWriter; +import javax.xml.stream.XMLStreamException; +import javax.xml.transform.Result; +import java.io.File; +import java.io.IOException; +import java.util.Collections; +import java.util.List; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertTrue; +import static org.junit.Assert.fail; +import static org.mockito.Mockito.mock; +import static org.mockito.Mockito.when; + /** * Tests for {@link StaxEventItemWriter}. */ @@ -107,7 +106,7 @@ public class StaxEventItemWriterTests { @Before public void setUp() throws Exception { - File directory = new File("target/data"); + File directory = new File("build/data"); directory.mkdirs(); resource = new FileSystemResource(File.createTempFile("StaxEventWriterOutputSourceTests", ".xml", directory)); writer = createItemWriter(); diff --git a/spring-batch-infrastructure/src/test/java/org/springframework/batch/support/DatabaseTypeIntegrationTests.java b/spring-batch-infrastructure/src/test/java/org/springframework/batch/support/DatabaseTypeIntegrationTests.java index 5c6baec0d..38e9c4128 100644 --- a/spring-batch-infrastructure/src/test/java/org/springframework/batch/support/DatabaseTypeIntegrationTests.java +++ b/spring-batch-infrastructure/src/test/java/org/springframework/batch/support/DatabaseTypeIntegrationTests.java @@ -16,11 +16,11 @@ package org.springframework.batch.support; -import static org.junit.Assert.assertEquals; +import org.junit.Test; import javax.sql.DataSource; -import org.junit.Test; +import static org.junit.Assert.assertEquals; /** * @author Dave Syer @@ -31,7 +31,7 @@ public class DatabaseTypeIntegrationTests { @Test public void testH2() throws Exception { DataSource dataSource = DatabaseTypeTestUtils.getDataSource(org.h2.Driver.class, - "jdbc:h2:file:target/data/sample"); + "jdbc:h2:file:build/data/sample"); assertEquals(DatabaseType.H2, DatabaseType.fromMetaData(dataSource)); dataSource.getConnection(); } diff --git a/spring-batch-infrastructure/src/test/java/org/springframework/batch/support/LastModifiedResourceComparatorTests.java b/spring-batch-infrastructure/src/test/java/org/springframework/batch/support/LastModifiedResourceComparatorTests.java index 194027be4..46a69abb2 100644 --- a/spring-batch-infrastructure/src/test/java/org/springframework/batch/support/LastModifiedResourceComparatorTests.java +++ b/spring-batch-infrastructure/src/test/java/org/springframework/batch/support/LastModifiedResourceComparatorTests.java @@ -15,15 +15,15 @@ */ package org.springframework.batch.support; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertTrue; +import org.apache.commons.io.FileUtils; +import org.junit.Test; +import org.springframework.core.io.FileSystemResource; import java.io.File; import java.io.IOException; -import org.apache.commons.io.FileUtils; -import org.junit.Test; -import org.springframework.core.io.FileSystemResource; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertTrue; /** * @author Dave Syer @@ -31,6 +31,8 @@ import org.springframework.core.io.FileSystemResource; */ public class LastModifiedResourceComparatorTests { + public static final String FILE_PATH = "src/test/resources/org/springframework/batch/support/existing.txt"; + private LastModifiedResourceComparator comparator = new LastModifiedResourceComparator(); @Test(expected = IllegalArgumentException.class) @@ -40,12 +42,12 @@ public class LastModifiedResourceComparatorTests { @Test(expected = IllegalArgumentException.class) public void testCompareOneNonExistent() { - comparator.compare(new FileSystemResource("pom.xml"), new FileSystemResource("crap")); + comparator.compare(new FileSystemResource(FILE_PATH), new FileSystemResource("crap")); } @Test public void testCompareSame() { - assertEquals(0, comparator.compare(new FileSystemResource("pom.xml"), new FileSystemResource("pom.xml"))); + assertEquals(0, comparator.compare(new FileSystemResource(FILE_PATH), new FileSystemResource(FILE_PATH))); } @Test @@ -53,24 +55,25 @@ public class LastModifiedResourceComparatorTests { File temp = File.createTempFile(getClass().getSimpleName(), ".txt"); temp.deleteOnExit(); assertTrue(temp.exists()); - assertEquals(1, comparator.compare(new FileSystemResource(temp), new FileSystemResource("pom.xml"))); + assertEquals(1, comparator.compare(new FileSystemResource(temp), new FileSystemResource(FILE_PATH))); } @Test public void testCompareNewWithOldAfterCopy() throws Exception { - File temp1 = new File("target/temp1.txt"); - File temp2 = new File("target/temp2.txt"); - if (temp1.exists()) temp1.delete(); - if (temp2.exists()) temp2.delete(); - temp1.getParentFile().mkdirs(); - temp2.createNewFile(); + File temp1 = new File("build/temp1.txt"); + File temp2 = new File("build/temp2.txt"); + if (temp1.exists()) temp1.delete(); + if (temp2.exists()) temp2.delete(); + temp1.getParentFile().mkdirs(); + temp2.createNewFile(); assertTrue(!temp1.exists() && temp2.exists()); - // For Linux sleep here otherwise files show same - // modified date - Thread.sleep(1000); + // For Linux sleep here otherwise files show same + // modified date + Thread.sleep(1000); // Need to explicitly ask not to preserve the last modified date when we // copy... - FileUtils.copyFile(new File("pom.xml"), temp1, false); + + FileUtils.copyFile(new FileSystemResource(FILE_PATH).getFile(), temp1, false); assertEquals(1, comparator.compare(new FileSystemResource(temp1), new FileSystemResource(temp2))); } diff --git a/spring-batch-infrastructure/src/test/java/test/jdbc/datasource/DataSourceInitializer.java b/spring-batch-infrastructure/src/test/java/test/jdbc/datasource/DataSourceInitializer.java index 8fbe4f4f1..556696b6c 100644 --- a/spring-batch-infrastructure/src/test/java/test/jdbc/datasource/DataSourceInitializer.java +++ b/spring-batch-infrastructure/src/test/java/test/jdbc/datasource/DataSourceInitializer.java @@ -16,11 +16,6 @@ package test.jdbc.datasource; -import java.io.IOException; -import java.util.List; - -import javax.sql.DataSource; - import org.apache.commons.io.IOUtils; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; @@ -39,9 +34,13 @@ import org.springframework.util.Assert; import org.springframework.util.ClassUtils; import org.springframework.util.StringUtils; +import javax.sql.DataSource; +import java.io.IOException; +import java.util.List; + /** * Wrapper for a {@link DataSource} that can run scripts on start up and shut - * down. Us as a bean definition

      + * down. Us as a bean definition

      * * Run this class to initialize a database in a running server process. * Make sure the server is running first by launching the "hsql-server" from the diff --git a/spring-batch-infrastructure/src/test/resources/org/springframework/batch/item/database/stored-procedure-context.xml b/spring-batch-infrastructure/src/test/resources/org/springframework/batch/item/database/stored-procedure-context.xml index abb7d264d..3b9eb7210 100644 --- a/spring-batch-infrastructure/src/test/resources/org/springframework/batch/item/database/stored-procedure-context.xml +++ b/spring-batch-infrastructure/src/test/resources/org/springframework/batch/item/database/stored-procedure-context.xml @@ -15,7 +15,7 @@ - + diff --git a/spring-batch-infrastructure/src/test/resources/org/springframework/batch/support/existing.txt b/spring-batch-infrastructure/src/test/resources/org/springframework/batch/support/existing.txt new file mode 100644 index 000000000..5608f4c83 --- /dev/null +++ b/spring-batch-infrastructure/src/test/resources/org/springframework/batch/support/existing.txt @@ -0,0 +1 @@ +This file is pre-existing \ No newline at end of file diff --git a/spring-batch-infrastructure/template.mf b/spring-batch-infrastructure/template.mf deleted file mode 100644 index b33f95ca5..000000000 --- a/spring-batch-infrastructure/template.mf +++ /dev/null @@ -1,48 +0,0 @@ -Manifest-Version: 1.0 -Bundle-SymbolicName: org.springframework.batch.infrastructure -Bundle-Name: Spring Batch Infrastructure -Bundle-Vendor: Spring -Bundle-Version: ${version} -Bundle-ManifestVersion: 2 -Import-Template: - com.thoughtworks.xstream.*;version="[1.3,1.4)";resolution:=optional, - org.codehaus.jettison.*;version="[1.0,1.1)";resolution:=optional, - org.codehaus.jackson.*;version="[1.0.1,1.1)";resolution:=optional, - org.aopalliance.*;version="[1.0.0,2.0.0)", - org.aspectj.*;version="[1.5.2,1.7.0)", - org.hibernate.*;version="[3.2.5.ga,3.3.0.ga)";resolution:=optional, - org.apache.commons.lang.*;version="[2.1,3.0)";resolution:=optional, - org.apache.commons.logging.*;version="[1.1.0,2.0.0)", - com.ibatis.sqlmap.*;version="[2.3.0,3.0.0)";resolution:=optional, - org.springframework.batch.*;version="[2.0.0,3.0.0)", - org.springframework.aop.*;version="[3.1.2,4.0.0)", - org.springframework.beans.*;version="[3.1.2,4.0.0)", - org.springframework.context.*;version="[3.1.2,4.0.0)", - org.springframework.core.*;version="[3.1.2,4.0.0)", - org.springframework.dao.*;version="[3.1.2,4.0.0)";resolution:=optional, - org.springframework.jdbc.*;version="[3.1.2,4.0.0)";resolution:=optional, - org.springframework.jms.*;version="[3.1.2,4.0.0)";resolution:=optional, - org.springframework.mail.*;version="[3.1.2,4.0.0)";resolution:=optional, - org.springframework.orm.*;version="[3.1.2,4.0.0)";resolution:=optional, - org.springframework.oxm.*;version="[3.1.2,4.0.0)";resolution:=optional, - org.springframework.xml.*;version="[3.1.2,4.0.0)";resolution:=optional, - org.springframework.validation.*;version="[3.1.2,4.0.0)";resolution:=optional, - org.springframework.transaction.*;version="[3.1.2,4.0.0)";resolution:=optional, - org.springframework.util.*;version="[3.1.2,4.0.0)";resolution:=optional, - org.springframework.osgi.*;version="[1.1.0,2.0.0)";resolution:=optional, - org.springframework.amqp.*;version="[1.1.0,2.0.0)";resolution:=optional, - org.springframework.retry.*;version="[1.0.0,2.0.0)";resolution:=optional, - org.springframework.classify.*;version="[1.0.0,2.0.0)";resolution:=optional, - org.springframework.data.domain.*;version="[1.5.0,2.0.0)";resolution:=optional, - org.springframework.data.gemfire.*;version="[1.3.0,2.0.0)";resolution:=optional, - org.springframework.data.mongodb.*;version="[1.1.0,2.0.0)";resolution:=optional, - org.springframework.data.neo4j.*;version="[2.2.0,3.0.0)";resolution:=optional, - org.springframework.data.repository.*;version="[1.5.0,2.0.0)";resolution:=optional, - com.mongodb.*;version="[2.1.9,3.0.0)";resolution:=optional, - javax.sql.*;version="0";resolution:=optional, - javax.jms;version="0";resolution:=optional, - javax.persistence;version="0";resolution:=optional, - javax.xml.*;version="0";resolution:=optional, - javax.mail.*;version="0";resolution:=optional -Import-Package: - org.springframework.batch.core;version="[2.0.0,3.0.0)" diff --git a/spring-batch-integration/pom.xml b/spring-batch-integration/pom.xml deleted file mode 100644 index fb7daf274..000000000 --- a/spring-batch-integration/pom.xml +++ /dev/null @@ -1,190 +0,0 @@ - - - 4.0.0 - spring-batch-integration - Batch Integration - http://docs.spring.io/spring-batch/ - - org.springframework.batch - spring-batch-parent - 3.0.0.BUILD-SNAPSHOT - ../spring-batch-parent - - - 4.0.0.RC1 - 3.1 - - - - org.springframework.batch - spring-batch-core - compile - ${project.version} - - - org.springframework.batch - spring-batch-test - ${project.version} - test - - - org.springframework.retry - spring-retry - - - org.apache.geronimo.specs - geronimo-jms_1.1_spec - true - - - org.apache.activemq - activemq-core - 5.3.0 - test - - - junit - junit - - - org.slf4j - slf4j-log4j12 - true - - - log4j - log4j - true - - - org.aspectj - aspectjrt - test - - - org.aspectj - aspectjweaver - test - - - cglib - cglib-nodep - test - - - commons-dbcp - commons-dbcp - test - - - commons-pool - commons-pool - test - - - com.h2database - h2 - test - - - mysql - mysql-connector-java - 5.1.6 - test - - - org.apache.derby - derby - test - - - org.hsqldb - hsqldb - test - - - org.springframework.integration - spring-integration-core - ${spring.integration.version} - compile - - - org.springframework.integration - spring-integration-test - ${spring.integration.version} - test - - - junit-dep - junit - - - - - org.springframework.integration - spring-integration-jdbc - ${spring.integration.version} - test - - - org.springframework.integration - spring-integration-jms - ${spring.integration.version} - true - - - org.springframework - spring-context - - - org.springframework - spring-messaging - ${spring.framework.version} - - - org.springframework - spring-aop - - - org.springframework - spring-jms - true - - - org.springframework - spring-tx - - - org.springframework - spring-test - - - org.mockito - mockito-all - test - - - - - - com.springsource.bundlor - com.springsource.bundlor.maven - - - org.apache.maven.plugins - maven-clean-plugin - - - - activemq-data - - ** - * - - - - - - - - diff --git a/spring-batch-integration/src/main/java/org/springframework/batch/integration/launch/JobLaunchingGateway.java b/spring-batch-integration/src/main/java/org/springframework/batch/integration/launch/JobLaunchingGateway.java index 1c8d7e63b..2c0843f2b 100644 --- a/spring-batch-integration/src/main/java/org/springframework/batch/integration/launch/JobLaunchingGateway.java +++ b/spring-batch-integration/src/main/java/org/springframework/batch/integration/launch/JobLaunchingGateway.java @@ -51,7 +51,7 @@ public class JobLaunchingGateway extends AbstractReplyProducingMessageHandler { * Launches a Batch Job using the provided request {@link Message}. The payload * of the {@link Message} must be an instance of {@link JobLaunchRequest}. * - * @param The provided requestMessage must not be null. + * @param requestMessage must not be null. * @return Generally a {@link JobExecution} will always be returned. An * exception ({@link MessageHandlingException}) will only be thrown if there * is a failure to start the job. The cause of the exception will be a diff --git a/spring-batch-integration/src/main/java/org/springframework/batch/integration/partition/MessageChannelPartitionHandler.java b/spring-batch-integration/src/main/java/org/springframework/batch/integration/partition/MessageChannelPartitionHandler.java index e57cbb076..5d260ed04 100644 --- a/spring-batch-integration/src/main/java/org/springframework/batch/integration/partition/MessageChannelPartitionHandler.java +++ b/spring-batch-integration/src/main/java/org/springframework/batch/integration/partition/MessageChannelPartitionHandler.java @@ -1,9 +1,5 @@ package org.springframework.batch.integration.partition; -import java.util.Collection; -import java.util.List; -import java.util.Set; - import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.springframework.batch.core.Step; @@ -23,6 +19,10 @@ import org.springframework.messaging.MessageChannel; import org.springframework.messaging.PollableChannel; import org.springframework.util.Assert; +import java.util.Collection; +import java.util.List; +import java.util.Set; + /** * A {@link PartitionHandler} that uses {@link MessageChannel} instances to send instructions to remote workers and * receive their responses. The {@link MessageChannel} provides a nice abstraction so that the location of the workers @@ -65,7 +65,7 @@ public class MessageChannelPartitionHandler implements PartitionHandler { * channel that returns a list of {@link StepExecution} results
    The timeout for the repoy should be set * sufficiently long that the remote steps have time to complete. * - * @param messagingGateway the {@link MessagingOperations} to set + * @param messagingGateway the {@link org.springframework.integration.core.MessagingTemplate} to set */ public void setMessagingOperations(MessagingTemplate messagingGateway) { this.messagingGateway = messagingGateway; diff --git a/spring-batch-integration/src/test/java/org/springframework/batch/integration/file/ResourceSplitterIntegrationTests.java b/spring-batch-integration/src/test/java/org/springframework/batch/integration/file/ResourceSplitterIntegrationTests.java index 2a66ad292..e89cdf342 100644 --- a/spring-batch-integration/src/test/java/org/springframework/batch/integration/file/ResourceSplitterIntegrationTests.java +++ b/spring-batch-integration/src/test/java/org/springframework/batch/integration/file/ResourceSplitterIntegrationTests.java @@ -53,7 +53,7 @@ public class ResourceSplitterIntegrationTests { private PollableChannel requests; /* - * This is so cool (but see INT-190)...
    + * This is so cool (but see INT-190)... * * The incoming message is a Resource pattern, and it is converted to the * correct payload type with Spring's default strategy diff --git a/spring-batch-integration/template.mf b/spring-batch-integration/template.mf deleted file mode 100644 index 0782191cd..000000000 --- a/spring-batch-integration/template.mf +++ /dev/null @@ -1,25 +0,0 @@ -Bundle-SymbolicName: org.springframework.batch.integration -Bundle-Name: Spring Batch Integration -Bundle-Vendor: SpringSource -Bundle-ManifestVersion: 2 -Import-Template: - org.springframework.batch.*;version="[2.1.0, 3.0.0)", - org.springframework.integration.*;version="[2.0.0, 3.0.0)", - org.springframework.beans.*;version="[3.0.4, 4.0.0)", - org.springframework.context.*;version="[3.0.4, 4.0.0)", - org.springframework.core.*;version="[3.0.4, 4.0.0)", - org.springframework.jdbc.*;version="[3.0.4, 4.0.0)", - org.springframework.stereotype.*;version="[3.0.4, 4.0.0)", - org.springframework.scheduling.*;version="[3.0.4, 4.0.0)", - org.springframework.ui.*;version="[3.0.4, 4.0.0)", - org.springframework.transaction.*;version="[3.0.4, 4.0.0)", - org.springframework.web.*;version="[3.0.4, 4.0.0)", - org.springframework.validation.*;version="[3.0.4, 4.0.0)", - org.springframework.util;version="[3.0.4, 4.0.0)", - org.apache.commons.logging;version="[1.1.1, 2.0.0)", - org.apache.commons.dbcp.*;version="[1.2.2, 2.0.0)";resolution:=optional, - org.apache.commons.io.*;version="[1.4.0, 2.0.0)";resolution:=optional, - org.aspectj.*;version="0", - javax.sql;version="0", - javax.servlet.*;version="0";resolution:=optional, - org.w3c.dom.*;version="0" diff --git a/spring-batch-jsr352-tck/pom.xml b/spring-batch-jsr352-tck/pom.xml deleted file mode 100644 index 3ef838cd1..000000000 --- a/spring-batch-jsr352-tck/pom.xml +++ /dev/null @@ -1,202 +0,0 @@ - - - 4.0.0 - spring-batch-jsr352-tck - pom - JSR-352-TCK - Executes the JSR-352-TCK suite - http://docs.spring.io/spring-batch/${project.artifactId} - - org.springframework.batch - spring-batch-parent - 3.0.0.BUILD-SNAPSHOT - ../spring-batch-parent - - - UTF-8 - ${env.JSR_352_TCK_LIBS} - ${env.JSR_352_TCK_HOME} - - - - javax.batch - javax.batch-api - - - org.springframework - spring-core - - - org.springframework - spring-context - - - org.springframework - spring-beans - - - commons-logging - commons-logging-api - 1.1 - - - org.springframework - spring-aop - - - org.springframework - spring-tx - - - org.springframework.retry - spring-retry - - - org.hsqldb - hsqldb - - - org.springframework - spring-jdbc - - - com.thoughtworks.xstream - xstream - - - org.codehaus.jettison - jettison - - - commons-dbcp - commons-dbcp - 1.4 - - - org.apache.derby - derby - - - commons-pool - commons-pool - 1.5.4 - - - org.springframework.batch - spring-batch-core - ${project.version} - - - org.springframework.batch - spring-batch-infrastructure - ${project.version} - - - ant-contrib - ant-contrib - 1.0b3 - - - - - - org.apache.maven.plugins - maven-dependency-plugin - - - copy-dependencies - prepare-package - - copy-dependencies - - - ${jsr352.tck.libs.dir} - true - true - - - - - - org.apache.maven.plugins - maven-clean-plugin - 2.5 - - - prepare-package - - - - - - ${jsr352.tck.libs.dir} - - **/* - - false - - - - - - maven-antrun-plugin - 1.7 - - - ant - prepare-package - - run - - - - - - - - - - - - - - - - - - - - - org.apache.maven.plugins - maven-enforcer-plugin - 1.3.1 - - - enforce-property - - enforce - - - - - JSR_352_TCK_LIBS - JSR_352_TCK_LIBS environment variable must be set! - - - JSR_352_TCK_HOME - JSR_352_TCK_HOME environment variable must be set! - - - JSR_352_BATCH_IMPL_CLASSES - JSR_352_BATCH_IMPL_CLASSES environment variable must be set! - - - true - - - - - - - diff --git a/spring-batch-parent/pom.xml b/spring-batch-parent/pom.xml deleted file mode 100644 index a9e34e978..000000000 --- a/spring-batch-parent/pom.xml +++ /dev/null @@ -1,804 +0,0 @@ - - - 4.0.0 - org.springframework.batch - spring-batch-parent - 3.0.0.BUILD-SNAPSHOT - Spring Batch Parent - Spring Batch parent project. Defines dependencies and common configuration for the build process. - http://docs.spring.io/spring-batch/${project.artifactId} - pom - - https://github.com/spring-projects/spring-batch - scm:git:git://github.com/spring-projects/spring-batch.git - scm:git:git://github.com/spring-projects/spring-batch.git - HEAD - - - - Apache 2.0 - http://www.apache.org/licenses/LICENSE-2.0.txt - - - - - dsyer - Dave Syer - david.syer@springsource.com - - - mminella - Michael Minella - mminella@gopivotal.com.com - - - cschaefer - Chris Schaefer - cschaefer@gopivotal.com - - - - 4.0.4.RELEASE - 1.3.2.RELEASE - 4.10 - 1.0.0.RELEASE - 3.1 - false - UTF-8 - 1.7 - 1.7 - - - - fast - - true - true - - - - central - - - - - sonatype-nexus-snapshots - Sonatype Nexus Snapshots - https://oss.sonatype.org/content/repositories/snapshots/ - - - sonatype-nexus-staging - Nexus Release Repository - https://oss.sonatype.org/service/local/staging/deploy/maven2/ - - - - - - maven-gpg-plugin - - - sign-artifacts - verify - - sign - - - - - - - - - staging - - - staging - file:///${user.dir}/target/staging - - - staging - file:///${user.dir}/target/staging - - - staging - file:///${user.dir}/target/staging - - - - - milestone - - - spring-milestone - Spring Milestone Repository - http://repo.spring.io/milestone - - - - - dist - - - - maven-javadoc-plugin - - - javadoc - package - - jar - - - - - - maven-source-plugin - - - attach-sources - - jar - - - - - - - - - bootstrap - - - objectstyle - ObjectStyle.org Repository - http://objectstyle.org/maven2/ - - false - - - - apache-snapshot - Apache Foundation Snapshot Repository - http://people.apache.org/maven-snapshot-repository/ - - - springsource-milestone - SpringSource Milestone Repository - http://repo.spring.io/libs-milestone - - - gemstone - Release bundles for SQLFire and GemFire - http://dist.gemstone.com.s3.amazonaws.com/maven/release - - - neo4j-public-release-repository - http://m2.neo4j.org/releases - - false - - - - - - apache-snapshots - http://people.apache.org/maven-snapshot-repository/ - - - - - - - - org.springframework.build.aws - org.springframework.build.aws.maven - 3.0.0.RELEASE - - - - - - - org.eclipse.m2e - lifecycle-mapping - 1.0.0 - - - - - - com.springsource.bundlor - com.springsource.bundlor.maven - [1.0,) - - bundlor - - - - - - - - - org.apache.maven.plugins - maven-antrun-plugin - [1.0,) - - run - - - - - - - - - - - - maven-jar-plugin - 2.3 - - - ${project.build.outputDirectory}/META-INF/MANIFEST.MF - - - - - org.apache.maven.plugins - maven-antrun-plugin - - - org.apache.ant - ant - 1.7.0 - - - org.apache.ant - ant-trax - 1.7.0 - - - org.apache.ant - ant-apache-regexp - 1.7.0 - - - foundrylogic.vpp - vpp - 2.2.1 - - - - - org.apache.maven.plugins - maven-site-plugin - 3.1 - - - org.apache.maven.wagon - wagon-ssh - 2.2 - - - - - - - - org.apache.maven.plugins - maven-compiler-plugin - ${maven.compiler.plugin} - - ${compiler.source.version} - ${compiler.target.version} - - - - com.springsource.bundlor - com.springsource.bundlor.maven - ${bundlor.version} - true - - - bundlor-transform - compile - - bundlor - - - - - - org.apache.maven.plugins - maven-surefire-plugin - 2.12.3 - - - **/*Tests.java - - - **/Abstract*.java - - junit:junit - - - - - - - objectstyle - ObjectStyle.org Repository - http://objectstyle.org/maven2/ - - false - - - - com.springsource.repository.bundles.release - SpringSource Enterprise Bundle Repository - SpringSource Bundle Releases - http://repository.springsource.com/maven/bundles/release - - false - - - - - - - maven-jxr-plugin - 2.3 - - true - - - - maven-surefire-report-plugin - 2.12.3 - - true - - - - maven-project-info-reports-plugin - 2.5.1 - - - maven-javadoc-plugin - 2.8.1 - - true - - - - - javadoc - - - - - - - - - - org.aspectj - aspectjrt - 1.8.0 - - - org.aspectj - aspectjweaver - 1.8.0 - - - junit - junit - ${junit.version} - test - - - org.apache.geronimo.specs - geronimo-jms_1.1_spec - 1.1 - true - - - org.apache.geronimo.specs - geronimo-jta_1.1_spec - 1.1 - true - - - javax.annotation - jsr250-api - 1.0 - test - - - org.codehaus.woodstox - woodstox-core-asl - 4.2.0 - true - - - stax - stax-api - - - - - org.hibernate - hibernate-core - 4.2.12.Final - true - - - cglib - cglib - - - asm - asm - - - asm - asm-attrs - - - javax.transaction - jta - - - - - org.hibernate - hibernate-entitymanager - 4.2.12.Final - true - - - edu.oswego.cs.concurrent - edu.oswego.cs.dl.util.concurrent - - - org.hibernate - hibernate - - - - - org.hibernate - hibernate-validator - 4.3.1.Final - - - org.hibernate - hibernate-annotations - 3.3.1.GA - true - - - org.hibernate - hibernate - - - commons-logging - commons-logging - - - - - cglib - cglib-nodep - 2.1_3 - true - - - org.slf4j - slf4j-api - 1.7.6 - - - org.slf4j - slf4j-log4j12 - 1.7.6 - - - commons-lang - commons-lang - 2.6 - true - - - commons-io - commons-io - 2.4 - true - - - commons-collections - commons-collections - 3.2.1 - true - - - commons-dbcp - commons-dbcp - 1.4 - true - - - commons-pool - commons-pool - 1.5.4 - test - - - log4j - log4j - 1.2.17 - true - - - org.hsqldb - hsqldb - 2.3.2 - test - - - com.h2database - h2 - 1.3.175 - test - - - org.xerial - sqlite-jdbc - 3.7.2 - test - - - org.apache.derby - derby - 10.10.1.1 - test - - - com.thoughtworks.xstream - xstream - 1.4.7 - - - org.codehaus.jettison - jettison - 1.2 - - - stax - stax-api - - - - - org.apache.ibatis - ibatis-sqlmap - 2.3.4.726 - true - - - org.osgi - osgi_R4_core - 1.0 - true - - - asm - asm - 2.2.3 - runtime - true - - - asm - asm-attrs - 2.2.3 - runtime - true - - - asm - asm-commons - 2.2.3 - runtime - true - - - javax.servlet - javax.servlet-api - 3.0.1 - provided - true - - - javax.batch - javax.batch-api - 1.0 - provided - true - - - stax - stax - 1.2.0 - true - - - org.springframework - spring-aop - ${spring.framework.version} - - - org.springframework - spring-beans - ${spring.framework.version} - - - org.springframework - spring-context - ${spring.framework.version} - - - org.springframework - spring-context-support - ${spring.framework.version} - - - quartz - quartz - - - - - org.springframework - spring-core - ${spring.framework.version} - - - org.springframework - spring-jdbc - ${spring.framework.version} - - - org.springframework - spring-jms - ${spring.framework.version} - - - org.springframework - spring-orm - ${spring.framework.version} - - - org.springframework - spring-test - ${spring.framework.version} - test - - - org.springframework - spring-tx - ${spring.framework.version} - - - org.springframework - spring-web - ${spring.framework.version} - - - org.springframework - spring-oxm - ${spring.framework.version} - true - - - commons-lang - commons-lang - - - - - org.springframework.osgi - spring-osgi-core - 1.1.2 - true - - - org.springframework.retry - spring-retry - 1.1.0.RC2 - - - org.springframework.amqp - spring-amqp - ${spring.amqp.version} - - - org.springframework.amqp - spring-rabbit - ${spring.amqp.version} - - - org.mockito - mockito-all - 1.9.5 - test - - - org.springframework.data - spring-data-commons - 1.7.2.RELEASE - true - - - org.springframework.data - spring-data-jpa - 1.5.2.RELEASE - true - - - org.springframework.data - spring-data-mongodb - 1.4.2.RELEASE - true - - - org.springframework.data - spring-data-neo4j - 3.0.2.RELEASE - true - - - org.springframework.data - spring-data-gemfire - 1.3.4.RELEASE - true - - - org.springframework.ldap - spring-ldap-core - 2.0.1.RELEASE - true - - - org.springframework.ldap - spring-ldap-core-tiger - 2.0.1.RELEASE - true - - - org.springframework.ldap - spring-ldap-ldif-core - 2.0.1.RELEASE - true - - - - - - static.springframework.org - scp://static.springframework.org/var/www/domains/springframework.org/static/htdocs/spring-batch/trunk - - - spring-release - Spring Release Repository - s3://maven.springframework.org/release - - - spring-snapshot - Spring Snapshot Repository - s3://maven.springframework.org/snapshot - - - diff --git a/spring-batch-parent/src/site/site.xml b/spring-batch-parent/src/site/site.xml deleted file mode 100644 index 144e7b307..000000000 --- a/spring-batch-parent/src/site/site.xml +++ /dev/null @@ -1,23 +0,0 @@ - - - - ${project.name} - http://projects.spring.io/spring-batch/ - - - images/shim.gif - - - - - - org.springframework.maven.skins - maven-spring-skin - 1.0.5 - - - - - - - diff --git a/spring-batch-samples/README.md b/spring-batch-samples/README.md index b9436fd57..e97aa70d5 100644 --- a/spring-batch-samples/README.md +++ b/spring-batch-samples/README.md @@ -839,7 +839,7 @@ source view of the configuration is as follows: - + For simplicity we are only displaying the job configuration itself diff --git a/spring-batch-samples/pom.xml b/spring-batch-samples/pom.xml deleted file mode 100644 index 626f39c33..000000000 --- a/spring-batch-samples/pom.xml +++ /dev/null @@ -1,421 +0,0 @@ - - - 4.0.0 - spring-batch-samples - jar - Samples - http://docs.spring.io/spring-batch/${artifactId} - Example batch jobs using Spring Batch Core and Execution. - - org.springframework.batch - spring-batch-parent - 3.0.0.BUILD-SNAPSHOT - ../spring-batch-parent - - - https://github.com/spring-projects/spring-batch - scm:git:git://github.com/spring-projects/spring-batch.git - scm:git:git://github.com/spring-projects/spring-batch.git - HEAD - - - - hsql - - - - com.vmware.sqlfire - sqlfireclient - true - 1.0.3 - - - org.springframework.batch - spring-batch-core - ${project.version} - - - org.springframework.batch - spring-batch-test - ${project.version} - - - org.aspectj - aspectjrt - - - org.aspectj - aspectjweaver - - - junit - junit - - - org.quartz-scheduler - quartz - 2.2.1 - - - mysql - mysql-connector-java - 5.1.29 - runtime - - - net.sourceforge.jtds - jtds - 1.2.4 - runtime - - - org.hsqldb - hsqldb - runtime - - - com.h2database - h2 - runtime - - - commons-io - commons-io - - - commons-dbcp - commons-dbcp - - - commons-pool - commons-pool - - - com.thoughtworks.xstream - xstream - - - org.codehaus.woodstox - woodstox-core-asl - - - javax.servlet - javax.servlet-api - - - xmlunit - xmlunit - 1.5 - test - - - org.slf4j - slf4j-log4j12 - true - - - log4j - log4j - test - - - org.codehaus.groovy - groovy - 2.2.2 - runtime - - - org.codehaus.groovy - groovy-ant - 2.2.2 - runtime - - - org.hibernate - hibernate-core - - - org.hibernate - hibernate-entitymanager - true - - - org.hibernate - hibernate-annotations - true - - - org.apache.geronimo.specs - geronimo-jta_1.1_spec - - - cglib - cglib-nodep - - - org.apache.ibatis - ibatis-sqlmap - - - org.apache.derby - derby - true - compile - - - postgresql - postgresql - 9.0-801.jdbc4 - true - - - org.springframework - spring-aop - - - org.springframework - spring-oxm - - - org.springframework - spring-core - - - org.springframework - spring-context-support - - - org.springframework - spring-jdbc - - - org.springframework - spring-orm - - - org.springframework - spring-test - - - org.springframework - spring-tx - - - org.springframework - spring-web - true - runtime - - - org.springframework.data - spring-data-commons - true - - - org.springframework.data - spring-data-jpa - - - javax.mail - mail - 1.4.7 - - - org.springframework.amqp - spring-amqp - true - - - org.springframework.amqp - spring-rabbit - true - - - org.mockito - mockito-all - test - - - javax.inject - javax.inject - 1 - - - - - - maven-surefire-plugin - - - - ENVIRONMENT - ${environment} - - - - - - org.apache.maven.plugins - maven-antrun-plugin - - - generate-sql - generate-sources - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - run - - - - - - - - - org.apache.maven.plugins - maven-surefire-plugin - - junit:junit - - - - - - - - gemstone - Release bundles for SQLFire and GemFire - http://dist.gemstone.com.s3.amazonaws.com/maven/release - - - libs-milestone - http://repo.spring.io/libs-milestone - - - plugins-release - http://repo.spring.io/plugins-release - - - diff --git a/spring-batch-samples/src/main/java/org/springframework/batch/sample/common/OutputFileListener.java b/spring-batch-samples/src/main/java/org/springframework/batch/sample/common/OutputFileListener.java index ab400c74a..630d49cd3 100644 --- a/spring-batch-samples/src/main/java/org/springframework/batch/sample/common/OutputFileListener.java +++ b/spring-batch-samples/src/main/java/org/springframework/batch/sample/common/OutputFileListener.java @@ -30,7 +30,7 @@ public class OutputFileListener { private String inputKeyName = "fileName"; - private String path = "file:./target/output/"; + private String path = "file:./build/output/"; public void setPath(String path) { this.path = path; diff --git a/spring-batch-samples/src/main/java/org/springframework/batch/sample/domain/multiline/AggregateItemReader.java b/spring-batch-samples/src/main/java/org/springframework/batch/sample/domain/multiline/AggregateItemReader.java index 46c950614..a27b645d0 100644 --- a/spring-batch-samples/src/main/java/org/springframework/batch/sample/domain/multiline/AggregateItemReader.java +++ b/spring-batch-samples/src/main/java/org/springframework/batch/sample/domain/multiline/AggregateItemReader.java @@ -30,7 +30,7 @@ import org.springframework.batch.item.ItemReader; * {@link ItemReader} that can identify the record boundaries. The custom reader * should mark the beginning and end of records by returning an * {@link AggregateItem} which responds true to its query methods - * is*().

    + * is*().

    * * This class is thread-safe (it can be used concurrently by multiple threads) * as long as the {@link ItemReader} is also thread-safe. diff --git a/spring-batch-samples/src/main/resources/batch-h2.properties b/spring-batch-samples/src/main/resources/batch-h2.properties index 925428ced..edfc12008 100644 --- a/spring-batch-samples/src/main/resources/batch-h2.properties +++ b/spring-batch-samples/src/main/resources/batch-h2.properties @@ -1,7 +1,7 @@ # Placeholders batch.* # for H2: batch.jdbc.driver=org.h2.Driver -batch.jdbc.url=jdbc:h2:file:target/data/h2 +batch.jdbc.url=jdbc:h2:file:build/data/h2 batch.jdbc.user=sa batch.jdbc.password= batch.jdbc.testWhileIdle=false diff --git a/spring-batch-samples/src/main/resources/jobs/compositeItemWriterSampleJob.xml b/spring-batch-samples/src/main/resources/jobs/compositeItemWriterSampleJob.xml index 021296173..7a5d1398a 100644 --- a/spring-batch-samples/src/main/resources/jobs/compositeItemWriterSampleJob.xml +++ b/spring-batch-samples/src/main/resources/jobs/compositeItemWriterSampleJob.xml @@ -74,7 +74,7 @@ - + @@ -82,7 +82,7 @@ - + diff --git a/spring-batch-samples/src/main/resources/jobs/groovyJob.xml b/spring-batch-samples/src/main/resources/jobs/groovyJob.xml index 0118572ce..a6b339f22 100644 --- a/spring-batch-samples/src/main/resources/jobs/groovyJob.xml +++ b/spring-batch-samples/src/main/resources/jobs/groovyJob.xml @@ -35,7 +35,7 @@ void execute() { def ant = new AntBuilder() ant.unzip(src:"src/main/resources/data/groovyJob/input/files.zip", - dest:"target/groovyJob/staging") + dest:"build/groovyJob/staging") } } @@ -46,9 +46,9 @@ class ZipTasklet { void execute() { def ant = new AntBuilder() - ant.mkdir(dir:"target/groovyJob/output") - ant.zip(destfile:"target/groovyJob/output/files.zip", - basedir:"target/groovyJob/staging", includes:"**") + ant.mkdir(dir:"build/groovyJob/output") + ant.zip(destfile:"build/groovyJob/output/files.zip", + basedir:"build/groovyJob/staging", includes:"**") } } diff --git a/spring-batch-samples/src/main/resources/jobs/headerFooterSample.xml b/spring-batch-samples/src/main/resources/jobs/headerFooterSample.xml index 936f036b3..9d464afae 100644 --- a/spring-batch-samples/src/main/resources/jobs/headerFooterSample.xml +++ b/spring-batch-samples/src/main/resources/jobs/headerFooterSample.xml @@ -61,6 +61,6 @@ + value="build/test-outputs/headerFooterOutput.txt" /> \ No newline at end of file diff --git a/spring-batch-samples/src/main/resources/jobs/iosample/multiLine.xml b/spring-batch-samples/src/main/resources/jobs/iosample/multiLine.xml index ed253903f..193b03984 100644 --- a/spring-batch-samples/src/main/resources/jobs/iosample/multiLine.xml +++ b/spring-batch-samples/src/main/resources/jobs/iosample/multiLine.xml @@ -35,7 +35,7 @@ - + diff --git a/spring-batch-samples/src/main/resources/jobs/iosample/multiRecordType.xml b/spring-batch-samples/src/main/resources/jobs/iosample/multiRecordType.xml index aeeac0f30..b42b13db8 100644 --- a/spring-batch-samples/src/main/resources/jobs/iosample/multiRecordType.xml +++ b/spring-batch-samples/src/main/resources/jobs/iosample/multiRecordType.xml @@ -55,7 +55,7 @@ - + diff --git a/spring-batch-samples/src/main/resources/jobs/iosample/xml.xml b/spring-batch-samples/src/main/resources/jobs/iosample/xml.xml index 57046f47a..c3fbcdf9d 100644 --- a/spring-batch-samples/src/main/resources/jobs/iosample/xml.xml +++ b/spring-batch-samples/src/main/resources/jobs/iosample/xml.xml @@ -31,6 +31,6 @@ - + diff --git a/spring-batch-samples/src/main/resources/jobs/multilineJob.xml b/spring-batch-samples/src/main/resources/jobs/multilineJob.xml index 60bb1a0f1..80eac53fb 100644 --- a/spring-batch-samples/src/main/resources/jobs/multilineJob.xml +++ b/spring-batch-samples/src/main/resources/jobs/multilineJob.xml @@ -23,7 +23,7 @@ + value="file:build/test-outputs/20070122.testStream.multilineStep.txt" /> diff --git a/spring-batch-samples/src/main/resources/jobs/multilineOrderJob.xml b/spring-batch-samples/src/main/resources/jobs/multilineOrderJob.xml index 3b8f7871c..8d6c4c1b5 100644 --- a/spring-batch-samples/src/main/resources/jobs/multilineOrderJob.xml +++ b/spring-batch-samples/src/main/resources/jobs/multilineOrderJob.xml @@ -58,7 +58,7 @@ - + diff --git a/spring-batch-samples/src/main/resources/jobs/partitionFileJob.xml b/spring-batch-samples/src/main/resources/jobs/partitionFileJob.xml index 5c6206258..51d57b08a 100644 --- a/spring-batch-samples/src/main/resources/jobs/partitionFileJob.xml +++ b/spring-batch-samples/src/main/resources/jobs/partitionFileJob.xml @@ -28,7 +28,7 @@ - + @@ -42,7 +42,7 @@ - + diff --git a/spring-batch-samples/src/main/resources/jobs/partitionJdbcJob.xml b/spring-batch-samples/src/main/resources/jobs/partitionJdbcJob.xml index a4e2b2839..e251af491 100644 --- a/spring-batch-samples/src/main/resources/jobs/partitionJdbcJob.xml +++ b/spring-batch-samples/src/main/resources/jobs/partitionJdbcJob.xml @@ -30,7 +30,7 @@ - + @@ -60,7 +60,7 @@ - + diff --git a/spring-batch-samples/src/main/resources/jobs/restartFileSampleJob.xml b/spring-batch-samples/src/main/resources/jobs/restartFileSampleJob.xml index 7173ef653..3370a8864 100644 --- a/spring-batch-samples/src/main/resources/jobs/restartFileSampleJob.xml +++ b/spring-batch-samples/src/main/resources/jobs/restartFileSampleJob.xml @@ -61,6 +61,6 @@ - + diff --git a/spring-batch-samples/src/main/resources/jobs/tradeJob.xml b/spring-batch-samples/src/main/resources/jobs/tradeJob.xml index 841c7e2db..02fb9bd26 100644 --- a/spring-batch-samples/src/main/resources/jobs/tradeJob.xml +++ b/spring-batch-samples/src/main/resources/jobs/tradeJob.xml @@ -80,7 +80,7 @@ - + diff --git a/spring-batch-samples/src/site/site.xml b/spring-batch-samples/src/site/site.xml deleted file mode 100644 index 56a12dcc8..000000000 --- a/spring-batch-samples/src/site/site.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - - - - - - - - - - - - diff --git a/spring-batch-samples/src/test/java/org/springframework/batch/sample/CompositeItemWriterSampleFunctionalTests.java b/spring-batch-samples/src/test/java/org/springframework/batch/sample/CompositeItemWriterSampleFunctionalTests.java index 2b6c8b498..59dc5c668 100644 --- a/spring-batch-samples/src/test/java/org/springframework/batch/sample/CompositeItemWriterSampleFunctionalTests.java +++ b/spring-batch-samples/src/test/java/org/springframework/batch/sample/CompositeItemWriterSampleFunctionalTests.java @@ -66,8 +66,8 @@ public class CompositeItemWriterSampleFunctionalTests { jobLauncherTestUtils.launchJob(); - checkOutputFile("target/test-outputs/CustomerReport1.txt"); - checkOutputFile("target/test-outputs/CustomerReport2.txt"); + checkOutputFile("build/test-outputs/CustomerReport1.txt"); + checkOutputFile("build/test-outputs/CustomerReport2.txt"); checkOutputTable(before); } diff --git a/spring-batch-samples/src/test/java/org/springframework/batch/sample/GroovyJobFunctionalTests.java b/spring-batch-samples/src/test/java/org/springframework/batch/sample/GroovyJobFunctionalTests.java index 38dbfc801..842d7ee73 100644 --- a/spring-batch-samples/src/test/java/org/springframework/batch/sample/GroovyJobFunctionalTests.java +++ b/spring-batch-samples/src/test/java/org/springframework/batch/sample/GroovyJobFunctionalTests.java @@ -41,14 +41,14 @@ public class GroovyJobFunctionalTests { @Before public void removeOldData() throws IOException { - FileUtils.deleteDirectory(new File("target/groovyJob")); + FileUtils.deleteDirectory(new File("build/groovyJob")); } @Test public void testLaunchJob() throws Exception { - assertFalse(new File("target/groovyJob/output/files.zip").exists()); + assertFalse(new File("build/groovyJob/output/files.zip").exists()); jobLauncherTestUtils.launchJob(); - assertTrue(new File("target/groovyJob/output/files.zip").exists()); + assertTrue(new File("build/groovyJob/output/files.zip").exists()); } } diff --git a/spring-batch-samples/src/test/java/org/springframework/batch/sample/MultilineJobFunctionalTests.java b/spring-batch-samples/src/test/java/org/springframework/batch/sample/MultilineJobFunctionalTests.java index 4bf8c4a55..7d499509c 100644 --- a/spring-batch-samples/src/test/java/org/springframework/batch/sample/MultilineJobFunctionalTests.java +++ b/spring-batch-samples/src/test/java/org/springframework/batch/sample/MultilineJobFunctionalTests.java @@ -42,7 +42,7 @@ public class MultilineJobFunctionalTests { private static final String EXPECTED_RESULT = "[Trade: [isin=UK21341EAH45,quantity=978,price=98.34,customer=customer1], Trade: [isin=UK21341EAH46,quantity=112,price=18.12,customer=customer2]]" + "[Trade: [isin=UK21341EAH47,quantity=245,price=12.78,customer=customer2], Trade: [isin=UK21341EAH48,quantity=108,price=9.25,customer=customer3], Trade: [isin=UK21341EAH49,quantity=854,price=23.39,customer=customer4]]"; - private Resource output = new FileSystemResource("target/test-outputs/20070122.testStream.multilineStep.txt"); + private Resource output = new FileSystemResource("build/test-outputs/20070122.testStream.multilineStep.txt"); @Test public void testJobLaunch() throws Exception { diff --git a/spring-batch-samples/src/test/java/org/springframework/batch/sample/MultilineOrderJobFunctionalTests.java b/spring-batch-samples/src/test/java/org/springframework/batch/sample/MultilineOrderJobFunctionalTests.java index 8ec71f390..94671014b 100644 --- a/spring-batch-samples/src/test/java/org/springframework/batch/sample/MultilineOrderJobFunctionalTests.java +++ b/spring-batch-samples/src/test/java/org/springframework/batch/sample/MultilineOrderJobFunctionalTests.java @@ -32,7 +32,7 @@ import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; "/job-runner-context.xml" }) public class MultilineOrderJobFunctionalTests { - private static final String ACTUAL = "target/test-outputs/multilineOrderOutput.txt"; + private static final String ACTUAL = "build/test-outputs/multilineOrderOutput.txt"; private static final String EXPECTED = "data/multilineOrderJob/result/multilineOrderOutput.txt"; @Autowired diff --git a/spring-batch-samples/src/test/java/org/springframework/batch/sample/common/OutputFileListenerTests.java b/spring-batch-samples/src/test/java/org/springframework/batch/sample/common/OutputFileListenerTests.java index c5fa2fbf6..b22087e11 100644 --- a/spring-batch-samples/src/test/java/org/springframework/batch/sample/common/OutputFileListenerTests.java +++ b/spring-batch-samples/src/test/java/org/springframework/batch/sample/common/OutputFileListenerTests.java @@ -15,12 +15,12 @@ */ package org.springframework.batch.sample.common; -import static org.junit.Assert.assertEquals; - import org.junit.Test; import org.springframework.batch.core.JobExecution; import org.springframework.batch.core.StepExecution; +import static org.junit.Assert.assertEquals; + public class OutputFileListenerTests { private OutputFileListener listener = new OutputFileListener(); private StepExecution stepExecution = new StepExecution("foo", new JobExecution(0L), 1L); @@ -28,7 +28,7 @@ public class OutputFileListenerTests { @Test public void testCreateOutputNameFromInput() { listener.createOutputNameFromInput(stepExecution); - assertEquals("{outputFile=file:./target/output/foo.csv}", stepExecution.getExecutionContext().toString()); + assertEquals("{outputFile=file:./build/output/foo.csv}", stepExecution.getExecutionContext().toString()); } @Test diff --git a/spring-batch-samples/src/test/java/org/springframework/batch/sample/iosample/DelimitedFunctionalTests.java b/spring-batch-samples/src/test/java/org/springframework/batch/sample/iosample/DelimitedFunctionalTests.java index 489603268..feb6a5269 100644 --- a/spring-batch-samples/src/test/java/org/springframework/batch/sample/iosample/DelimitedFunctionalTests.java +++ b/spring-batch-samples/src/test/java/org/springframework/batch/sample/iosample/DelimitedFunctionalTests.java @@ -39,7 +39,7 @@ public class DelimitedFunctionalTests extends AbstractIoSampleTests { @Override protected void pointReaderToOutput(ItemReader reader) { JobParameters jobParameters = new JobParametersBuilder(super.getUniqueJobParameters()).addString("inputFile", - "file:./target/test-outputs/delimitedOutput.csv").toJobParameters(); + "file:./build/test-outputs/delimitedOutput.csv").toJobParameters(); StepExecution stepExecution = MetaDataInstanceFactory.createStepExecution(jobParameters); StepSynchronizationManager.close(); StepSynchronizationManager.register(stepExecution); @@ -49,7 +49,7 @@ public class DelimitedFunctionalTests extends AbstractIoSampleTests { protected JobParameters getUniqueJobParameters() { return new JobParametersBuilder(super.getUniqueJobParameters()).addString("inputFile", "data/iosample/input/delimited.csv").addString("outputFile", - "file:./target/test-outputs/delimitedOutput.csv").toJobParameters(); + "file:./build/test-outputs/delimitedOutput.csv").toJobParameters(); } } \ No newline at end of file diff --git a/spring-batch-samples/src/test/java/org/springframework/batch/sample/iosample/FixedLengthFunctionalTests.java b/spring-batch-samples/src/test/java/org/springframework/batch/sample/iosample/FixedLengthFunctionalTests.java index 375554822..bd383113d 100644 --- a/spring-batch-samples/src/test/java/org/springframework/batch/sample/iosample/FixedLengthFunctionalTests.java +++ b/spring-batch-samples/src/test/java/org/springframework/batch/sample/iosample/FixedLengthFunctionalTests.java @@ -34,7 +34,7 @@ public class FixedLengthFunctionalTests extends AbstractIoSampleTests { @Override protected void pointReaderToOutput(ItemReader reader) { JobParameters jobParameters = new JobParametersBuilder(super.getUniqueJobParameters()).addString("inputFile", - "file:./target/test-outputs/fixedLengthOutput.txt").toJobParameters(); + "file:./build/test-outputs/fixedLengthOutput.txt").toJobParameters(); StepExecution stepExecution = MetaDataInstanceFactory.createStepExecution(jobParameters); StepSynchronizationManager.close(); StepSynchronizationManager.register(stepExecution); @@ -44,7 +44,7 @@ public class FixedLengthFunctionalTests extends AbstractIoSampleTests { protected JobParameters getUniqueJobParameters() { return new JobParametersBuilder(super.getUniqueJobParameters()).addString("inputFile", "data/iosample/input/fixedLength.txt").addString("outputFile", - "file:./target/test-outputs/fixedLengthOutput.txt").toJobParameters(); + "file:./build/test-outputs/fixedLengthOutput.txt").toJobParameters(); } } diff --git a/spring-batch-samples/src/test/java/org/springframework/batch/sample/iosample/MultiLineFunctionalTests.java b/spring-batch-samples/src/test/java/org/springframework/batch/sample/iosample/MultiLineFunctionalTests.java index bec139e0d..c3f944cdb 100644 --- a/spring-batch-samples/src/test/java/org/springframework/batch/sample/iosample/MultiLineFunctionalTests.java +++ b/spring-batch-samples/src/test/java/org/springframework/batch/sample/iosample/MultiLineFunctionalTests.java @@ -34,7 +34,7 @@ import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; "/job-runner-context.xml" }) public class MultiLineFunctionalTests { - private static final String OUTPUT_FILE = "target/test-outputs/multiLineOutput.txt"; + private static final String OUTPUT_FILE = "build/test-outputs/multiLineOutput.txt"; private static final String INPUT_FILE = "src/main/resources/data/iosample/input/multiLine.txt"; diff --git a/spring-batch-samples/src/test/java/org/springframework/batch/sample/iosample/MultiRecordTypeFunctionalTests.java b/spring-batch-samples/src/test/java/org/springframework/batch/sample/iosample/MultiRecordTypeFunctionalTests.java index eb4785850..740227117 100644 --- a/spring-batch-samples/src/test/java/org/springframework/batch/sample/iosample/MultiRecordTypeFunctionalTests.java +++ b/spring-batch-samples/src/test/java/org/springframework/batch/sample/iosample/MultiRecordTypeFunctionalTests.java @@ -34,7 +34,7 @@ import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; "/job-runner-context.xml" }) public class MultiRecordTypeFunctionalTests { - private static final String OUTPUT_FILE = "target/test-outputs/multiRecordTypeOutput.txt"; + private static final String OUTPUT_FILE = "build/test-outputs/multiRecordTypeOutput.txt"; private static final String INPUT_FILE = "src/main/resources/data/iosample/input/multiRecordType.txt"; diff --git a/spring-batch-samples/src/test/java/org/springframework/batch/sample/iosample/MultiResourceFunctionalTests.java b/spring-batch-samples/src/test/java/org/springframework/batch/sample/iosample/MultiResourceFunctionalTests.java index 120658ffb..75af11ffb 100644 --- a/spring-batch-samples/src/test/java/org/springframework/batch/sample/iosample/MultiResourceFunctionalTests.java +++ b/spring-batch-samples/src/test/java/org/springframework/batch/sample/iosample/MultiResourceFunctionalTests.java @@ -38,7 +38,7 @@ public class MultiResourceFunctionalTests extends AbstractIoSampleTests { @Override protected void pointReaderToOutput(ItemReader reader) { JobParameters jobParameters = new JobParametersBuilder(super.getUniqueJobParameters()).addString( - "input.file.path", "file:target/test-outputs/multiResourceOutput.csv.*").toJobParameters(); + "input.file.path", "file:build/test-outputs/multiResourceOutput.csv.*").toJobParameters(); StepExecution stepExecution = MetaDataInstanceFactory.createStepExecution(jobParameters); StepSynchronizationManager.close(); StepSynchronizationManager.register(stepExecution); @@ -48,7 +48,7 @@ public class MultiResourceFunctionalTests extends AbstractIoSampleTests { protected JobParameters getUniqueJobParameters() { JobParametersBuilder builder = new JobParametersBuilder(super.getUniqueJobParameters()); return builder.addString("input.file.path", "classpath:data/iosample/input/delimited*.csv").addString( - "output.file.path", "file:target/test-outputs/multiResourceOutput.csv").toJobParameters(); + "output.file.path", "file:build/test-outputs/multiResourceOutput.csv").toJobParameters(); } } diff --git a/spring-batch-samples/src/test/java/org/springframework/batch/sample/iosample/TwoJobInstancesDelimitedFunctionalTests.java b/spring-batch-samples/src/test/java/org/springframework/batch/sample/iosample/TwoJobInstancesDelimitedFunctionalTests.java index 2a820ac3d..ede97ad09 100644 --- a/spring-batch-samples/src/test/java/org/springframework/batch/sample/iosample/TwoJobInstancesDelimitedFunctionalTests.java +++ b/spring-batch-samples/src/test/java/org/springframework/batch/sample/iosample/TwoJobInstancesDelimitedFunctionalTests.java @@ -74,7 +74,7 @@ public class TwoJobInstancesDelimitedFunctionalTests { private void verifyOutput(int expected) throws Exception { JobParameters jobParameters = new JobParametersBuilder().addString("inputFile", - "file:./target/test-outputs/delimitedOutput.csv").toJobParameters(); + "file:./build/test-outputs/delimitedOutput.csv").toJobParameters(); StepExecution stepExecution = MetaDataInstanceFactory.createStepExecution(jobParameters); int count = StepScopeTestUtils.doInStepScope(stepExecution, new Callable() { @@ -101,6 +101,6 @@ public class TwoJobInstancesDelimitedFunctionalTests { protected JobParameters getJobParameters(String fileName) { return new JobParametersBuilder().addLong("timestamp", new Date().getTime()).addString("inputFile", fileName) - .addString("outputFile", "file:./target/test-outputs/delimitedOutput.csv").toJobParameters(); + .addString("outputFile", "file:./build/test-outputs/delimitedOutput.csv").toJobParameters(); } } diff --git a/spring-batch-samples/template.mf b/spring-batch-samples/template.mf deleted file mode 100755 index 0d55c0183..000000000 --- a/spring-batch-samples/template.mf +++ /dev/null @@ -1,11 +0,0 @@ -Manifest-Version: 1.0 -Bundle-SymbolicName: org.springframework.batch.samples -Bundle-Name: Spring Batch Samples -Bundle-Vendor: Spring -Bundle-Version: ${version} -Bundle-ManifestVersion: 2 -Ignored-Existing-Headers: - Import-Package, - Export-Package -Import-Template: - *;version="0" diff --git a/spring-batch-test/pom.xml b/spring-batch-test/pom.xml deleted file mode 100755 index 181cfc9e5..000000000 --- a/spring-batch-test/pom.xml +++ /dev/null @@ -1,89 +0,0 @@ - - - 4.0.0 - spring-batch-test - Test - jar - Domain for batch job testing - - org.springframework.batch - spring-batch-parent - 3.0.0.BUILD-SNAPSHOT - ../spring-batch-parent - - - https://github.com/spring-projects/spring-batch - scm:git:git://github.com/spring-projects/spring-batch.git - scm:git:git://github.com/spring-projects/spring-batch.git - HEAD - - - - org.springframework.batch - spring-batch-core - ${project.version} - - - org.aspectj - aspectjrt - true - - - junit - junit - compile - - - org.springframework - spring-test - compile - - - org.springframework - spring-jdbc - - - commons-io - commons-io - - - commons-dbcp - commons-dbcp - - - commons-pool - commons-pool - test - - - org.hsqldb - hsqldb - - - commons-collections - commons-collections - - - - - - org.codehaus.mojo - emma-maven-plugin - 1.0-alpha-1 - - - - - - - - org.apache.maven.plugins - maven-surefire-plugin - - junit:junit - - - - - - diff --git a/spring-batch-test/src/main/java/org/springframework/batch/test/DataSourceInitializer.java b/spring-batch-test/src/main/java/org/springframework/batch/test/DataSourceInitializer.java index 3bf89a20e..aa5a9d176 100755 --- a/spring-batch-test/src/main/java/org/springframework/batch/test/DataSourceInitializer.java +++ b/spring-batch-test/src/main/java/org/springframework/batch/test/DataSourceInitializer.java @@ -41,7 +41,7 @@ import org.springframework.util.StringUtils; /** * Wrapper for a {@link DataSource} that can run scripts on start up and shut - * down. Us as a bean definition

    + * down. Us as a bean definition

    * * Run this class to initialize a database in a running server process. * Make sure the server is running first by launching the "hsql-server" from the diff --git a/spring-batch-test/src/main/java/org/springframework/batch/test/JobRepositoryTestUtils.java b/spring-batch-test/src/main/java/org/springframework/batch/test/JobRepositoryTestUtils.java index 2ae8555f2..e2b892708 100644 --- a/spring-batch-test/src/main/java/org/springframework/batch/test/JobRepositoryTestUtils.java +++ b/spring-batch-test/src/main/java/org/springframework/batch/test/JobRepositoryTestUtils.java @@ -15,15 +15,6 @@ */ package org.springframework.batch.test; -import java.sql.ResultSet; -import java.sql.SQLException; -import java.util.ArrayList; -import java.util.Collection; -import java.util.Collections; -import java.util.List; - -import javax.sql.DataSource; - import org.springframework.batch.core.JobExecution; import org.springframework.batch.core.JobInstance; import org.springframework.batch.core.JobParameter; @@ -42,6 +33,14 @@ import org.springframework.jdbc.core.JdbcTemplate; import org.springframework.jdbc.core.simple.ParameterizedRowMapper; import org.springframework.util.Assert; +import javax.sql.DataSource; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.util.ArrayList; +import java.util.Collection; +import java.util.Collections; +import java.util.List; + /** * Convenience class for creating and removing {@link JobExecution} instances * from a database. Typical usage in test case would be to create instances @@ -123,7 +122,6 @@ public class JobRepositoryTestUtils extends AbstractJdbcBatchMetadataDao impleme * @param count the required number of instances of {@link JobExecution} to * create * @return a collection of {@link JobExecution} - * @throws Exception if there is a problem in the {@link JobRepository} */ public List createJobExecutions(String jobName, String[] stepNames, int count) throws JobExecutionAlreadyRunningException, JobRestartException, JobInstanceAlreadyCompleteException { @@ -147,7 +145,6 @@ public class JobRepositoryTestUtils extends AbstractJdbcBatchMetadataDao impleme * @param count the required number of instances of {@link JobExecution} to * create * @return a collection of {@link JobExecution} - * @throws Exception if there is a problem in the {@link JobRepository} */ public List createJobExecutions(int count) throws JobExecutionAlreadyRunningException, JobRestartException, JobInstanceAlreadyCompleteException { diff --git a/spring-batch-test/src/site/apt/changelog.apt b/spring-batch-test/src/site/apt/changelog.apt deleted file mode 100644 index 9525fae9e..000000000 --- a/spring-batch-test/src/site/apt/changelog.apt +++ /dev/null @@ -1,15 +0,0 @@ -Changelog: Spring Batch Test - -* 2.0.0.RC1 - * BATCH-1049: Add compile scope to spring-test in spring-batch-test - * BATCH-1048: Add site docos for the Test project - -* 2.0.0.M4 - - * BATCH-1045: Move DataSourceInitializer to the test project's "main" folder - * BATCH-1032: Modify AbstractJobTests in test project to be able to launch FlowJob steps individually - -* 2.0.0.M3 - - * BATCH-933: AssertFile class for checking equality of files in unit tests - * BATCH-903: Create test project diff --git a/spring-batch-test/src/site/apt/index.apt b/spring-batch-test/src/site/apt/index.apt deleted file mode 100644 index 70e9beec4..000000000 --- a/spring-batch-test/src/site/apt/index.apt +++ /dev/null @@ -1,22 +0,0 @@ -Spring Batch Test - -* Overview - - This module contains code for facilitating the testing of batch jobs. The project - includes the following classes: - -*----+----+ -| <> | <> | -*----+----+ -| AbstractJobTests | End-to-end batch job testing as well as testing individual steps | -*----+----+ -| AssertFile | Checking equality of flat files | -*----+----+ -| DataSourceInitializer | Wrapper for a DataSource that can run scripts on start up and shut down | -*----+----+ -| JobRepositoryTestUtils | Create and remove JobExecution instances from a database | -*----+----+ -| MetaDataInstanceFactory | Create test instances of JobExecution, JobInstance and StepExecution | -*----+----+ -| StepRunner | Execute steps outside of a Job | -*----+----+ diff --git a/spring-batch-test/src/site/site.xml b/spring-batch-test/src/site/site.xml deleted file mode 100644 index 4aac57281..000000000 --- a/spring-batch-test/src/site/site.xml +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - - - - - - - - - - - diff --git a/spring-batch-test/template.mf b/spring-batch-test/template.mf deleted file mode 100644 index 8287064be..000000000 --- a/spring-batch-test/template.mf +++ /dev/null @@ -1,39 +0,0 @@ -Manifest-Version: 1.0 -Bundle-SymbolicName: org.springframework.batch.test -Bundle-Name: Spring Batch Test -Bundle-Vendor: Spring -Bundle-Version: ${version} -Bundle-ManifestVersion: 2 -Ignored-Existing-Headers: - Import-Package, - Export-Package -Import-Template: - com.ibatis.sqlmap.*;version="[2.3.0, 3.0.0)";resolution:=optional, - javax.jms.*;version=1.1.0;resolution:=optional, - javax.xml.stream.*;version=1.2.0;resolution:=optional, - javax.persistence.*;version="[1.0.0,2.0.0)";resolution:=optional, - org.aopalliance.*;version="[1.0.0, 2.0.0)";resolution:=optional, - org.apache.commons.logging.*;version="[1.1.0, 2.0.0)", - org.apache.commons.io.*;version="[1.4.0, 2.0.0)";resolution:=optional, - org.junit;version="[4.4.0,5.0.0)";resolution:=optional, - junit.framework;version="[4.4.0,5.0.0)";resolution:=optional, - org.hibernate.*;version="[3.2.5.ga, 3.3.0.ga)";resolution:=optional, - org.springframework.batch.*;version="[2.0.0, 3.0.0)", - org.springframework.aop.*;version="[2.5.5, 4.0.0)";resolution:=optional, - org.springframework.aop.*;version="[2.5.5, 4.0.0)";resolution:=optional, - org.springframework.beans.*;version="[2.5.5, 4.0.0)";resolution:=optional, - org.springframework.core.*;version="[2.5.5, 4.0.0)";resolution:=optional, - org.springframework.dao.*;version="[2.5.5, 4.0.0)";resolution:=optional, - org.springframework.test.*;version="[2.5.5, 4.0.0)";resolution:=optional, - org.springframework.context.*;version="[2.5.5, 4.0.0)";resolution:=optional, - org.springframework.jdbc.*;version="[2.5.5, 4.0.0)";resolution:=optional, - org.springframework.jms.*;version="[2.5.5, 4.0.0)";resolution:=optional, - org.springframework.orm.*;version="[2.5.5, 4.0.0)";resolution:=optional, - org.springframework.transaction.*;version="[2.5.5, 4.0.0)";resolution:=optional, - org.springframework.util.*;version="[2.5.5, 4.0.0)";resolution:=optional, - org.springframework.validation.*;version="[2.5.5, 4.0.0)";resolution:=optional, - org.springframework.oxm.*;version="[1.5.0, 2.0.0)";resolution:=optional, - org.springframework.xml.*;version="[1.5.0, 2.0.0)";resolution:=optional, - javax.sql.*;version="0", - javax.xml.namespace.*;version="0", - javax.xml.transform.*;version="0" diff --git a/src/it/settings.xml b/src/it/settings.xml deleted file mode 100644 index a492aab1c..000000000 --- a/src/it/settings.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - it-repo - - true - - - - local.central - @localRepositoryUrl@ - - true - - - true - - - - - - local.central - @localRepositoryUrl@ - - true - - - true - - - - - - \ No newline at end of file