BATCH-2229 & BATCH-2218: Removed OSGi related metadata and Maven POMs

This commit is contained in:
Michael Minella
2014-05-08 14:37:27 -05:00
parent 76af420116
commit e7a4e348a5
147 changed files with 499 additions and 5044 deletions

View File

@@ -17,14 +17,14 @@
package org.springframework.batch.item;
/**
* Strategy interface for providing the data. <br/>
* Strategy interface for providing the data. <br>
*
* 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 <code>null</code> when all input data is exhausted.<br/>
* and finally returning <code>null</code> when all input data is exhausted.<br>
*
* Implementations need <b>not</b> be thread-safe and clients of a {@link ItemReader}
* need to be aware that this is the case.<br/>
* need to be aware that this is the case.<br>
*
* A richer interface (e.g. with a look ahead or peek) is not feasible because
* we need to support transactions in an asynchronous batch.

View File

@@ -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<T> {
* 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.
* <br/><br/>
* <br><br>
* If the {@link Iterator} is empty or null when it is
* returned, this {@link ItemReader} will assume that the
* input has been exhausted.

View File

@@ -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
*/

View File

@@ -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).<br/>
* <br/>
* default (see {@link #setClearSession(boolean) clearSession} property).<br>
* <br>
*
* The writer is thread-safe once properties are set (normal singleton behavior)
* if a {@link CurrentSessionContext} that uses only one session per thread is

View File

@@ -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.<br/>
* provided.<br>
*
* The user must provide an iBATIS statement id that points to the SQL statement defined
* in the iBATIS SqlMap configuration.<br/>
* in the iBATIS SqlMap configuration.<br>
*
* It is expected that {@link #write(List)} is called inside a transaction.<br/>
* It is expected that {@link #write(List)} is called inside a transaction.<br>
*
* The writer is thread-safe after its properties are set (normal singleton
* behavior), so it can be used to write in multiple concurrent transactions.<br/>
* behavior), so it can be used to write in multiple concurrent transactions.<br>
*
* <em>Note:</em> 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

View File

@@ -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;
/**
* <p>
@@ -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:</p>
* <ul>
* <li><code>_page</code>: the page number to be read (starting at 0)</li>
* <li><code>_pagesize</code>: the size of the pages, i.e. the number of rows to
@@ -60,6 +58,7 @@ import com.ibatis.sqlmap.client.SqlMapSession;
* <li><code>_skiprows</code>: the product of <code>_page</code> and
* <code>_pagesize</code></li>
* </ul>
* <p>
* 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.

View File

@@ -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;
/**
* <p>{@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.<br/>
* execute the SQL statement.<br>
*
* It is expected that {@link #write(List)} is called inside a transaction.<br/>
* It is expected that {@link #write(List)} is called inside a transaction.<br>
*
* The writer is thread-safe after its properties are set (normal singleton
* behavior), so it can be used to write in multiple concurrent transactions.

View File

@@ -36,7 +36,7 @@ public class JdbcParameterUtils {
* <code>sql</code>. 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 '&amp;'.
*
* The code for this method is taken from an early version of the
* {@link org.springframework.jdbc.core.namedparam.NamedParameterUtils}

View File

@@ -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.<br/>
* It is required that {@link #write(List)} is called inside a transaction.<br>
*
* The reader must be configured with an
* {@link javax.persistence.EntityManagerFactory} that is capable of

View File

@@ -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<String, Boolean> of sort columns as the key and boolean for ascending/descending (ascending = true).
* A Map&lt;String, Boolean&gt; of sort columns as the key and boolean for ascending/descending (ascending = true).
*
* @return sortKey key to use to sort and limit page content
*/

View File

@@ -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;
/**
* </p>Implementation of the {@link ItemPreparedStatementSetter} interface that assumes all
* <p>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.</p>

View File

@@ -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.<br/>
* {@link Resource} and must represent a writable file.<br>
*
* Uses buffered writer to improve performance.<br/>
* Uses buffered writer to improve performance.<br>
*
* The implementation is <b>not</b> 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.<br/>
* supplied the input object's toString method will be used.<br>
*
* @param items list of items to be written to output stream
* @throws Exception if the transformer or file output fail,

View File

@@ -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. <code>mydir/*.txt</code>, which can then be converted by Spring
* to an array of Resources by the ApplicationContext.
*
* <br/>
* <br/>
* <br>
* <br>
*
* Thread-safe between calls to {@link #open(ExecutionContext)}. The
* {@link ExecutionContext} is not accurate in a multi-threaded environment, so

View File

@@ -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.<br/>
* <br/>
* reflectively.<br>
* <br>
*
* 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.<br/>
* <br/>
* collection members) they need to be removed by a post processor.<br>
* <br>
*
* 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.<br/>
* <br/>
* methods, or you can provide a custom {@link FieldSet} implementation.<br>
* <br>
*
* 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<T> 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)}.<br/>
* for every call to {@link #mapFieldSet(FieldSet)}.<br>
*
* Either this property or the prototype bean name must be specified, but
* not both.

View File

@@ -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.<br/>
* Used by BeanWrapperImpl to suggest alternatives for an invalid property name.<br>
*
* Copied and slightly modified from Spring core,
*

View File

@@ -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 '<code>index</code>'.
*
* @returns null if the field value is <code>null</code>.
* @return null if the field value is <code>null</code>.
*/
protected String readAndTrim(int index) {
String value = tokens[index];

View File

@@ -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.</br>
* aggregating the provided item via the {@link Formatter} syntax.<br>
*
* @see Formatter
*

View File

@@ -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. </br> Input string should be
* ranges. Ranges can be provided in any order. <br> Input string should be
* provided in following format: 'range1, range2, range3,...' where range is
* specified as:
* <ul>
* <li>'X-Y', where X is minimum value and Y is maximum value (condition X<=Y
* <li>'X-Y', where X is minimum value and Y is maximum value (condition X&lt;=Y
* is verified)</li>
* <li>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;
* </ul>
* Minimum and maximum values can be from interval &lt;1, Integer.MAX_VALUE-1&gt;
* <p>
* Examples:</br>
* '1, 15, 25, 38, 55-60' is equal to '1-14, 15-24, 25-37, 38-54, 55-60' </br>
* Examples:<br>
* '1, 15, 25, 38, 55-60' is equal to '1-14, 15-24, 25-37, 38-54, 55-60' <br>
* '36, 14, 1-10, 15, 49-57' is equal to '36-48, 14-14, 1-10, 15-35, 49-57'
* <p>
* Property editor also allows to validate whether ranges are disjoint. Validation

View File

@@ -35,7 +35,7 @@ public class RecursiveCollectionLineAggregator<T> implements LineAggregator<Coll
/**
* Public setter for the {@link LineAggregator} to use on single items, that
* are not Strings. This can be used to strategise the conversion of
* collection and array elements to a String.<br/>
* collection and array elements to a String.<br>
*
* @param delegate the line aggregator to set. Defaults to a pass through.
*/

View File

@@ -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()}.<br/>
* <br/>
* {@link #read()}.<br>
* <br>
*
* The implementation is thread-safe after its properties are set (normal
* singleton behavior).

View File

@@ -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)}.<br/>
* <br/>
* {@link #write(List)}.<br>
* <br>
*
* The implementation is thread-safe after its properties are set (normal
* singleton behavior).

View File

@@ -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 <code>ItemTransformer</code>s (return value of previous
* transformation is the entry value of the next).<br/>
* <br/>
* transformation is the entry value of the next).<br>
* <br>
*
* Note the user is responsible for injecting a chain of {@link ItemProcessor}s
* that conforms to declared input and output types.

View File

@@ -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.<br/>
* <br/>
* Calls a collection of {@link ItemWriter}s in fixed-order sequence.<br>
* <br>
*
* The implementation is thread-safe if all delegates are thread-safe.
*

View File

@@ -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.
* <p/>
* <br>
* 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.
* <p/>
* <br>
* As the only class state maintained is to cache java reflection metadata, which is thread-safe, this class is thread-safe.
*
* @author Josh Long

View File

@@ -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).<br/>
* operation (e.g. a chunk).<br>
*
* There is no need to re-throw the exception here - that will be done by
* the enclosing framework.

View File

@@ -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).<br/>
* does not throw a timeout exception).<br>
*
* 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

View File

@@ -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.<br/>
* processes or threads.<br>
*
* 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.<br/>
* finish when exceptions are received. This is not the default behaviour.<br>
*
* Clients that want to take some business action when an exception is thrown by
* the {@link RepeatCallback} can consider using a custom {@link RepeatListener}

View File

@@ -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<ResultHolder> {
}
/**
* Get the next result as soon as it becomes available. <br/>
* <br/>
* Get the next result as soon as it becomes available. <br>
* <br>
* Release result immediately if:
* <ul>
* <li>There is a result that is continuable.</li>

View File

@@ -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<T> {
* 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}.<br/><br/>
* usually managed elsewhere, e.g. by a {@link TaskExecutor}.<br><br>
* Implementations may choose to block here, if they need to limit the
* number or rate of tasks being submitted.
*

View File

@@ -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.<br/>
* used to modify or monitor the behaviour at run time.<br>
*
* 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).<br/>
* then if the task executor is synchronous).<br>
*
* 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).<br/>
* each thread would have its own transaction).<br>
*
* @author Dave Syer
*