[BATCH-430] Rearranged package structure to remove technical packages

This commit is contained in:
nebhale
2008-03-07 14:56:10 +00:00
parent cce1b29f6d
commit c1887cdd9c
94 changed files with 163 additions and 180 deletions

View File

@@ -15,8 +15,8 @@
*/
package org.springframework.batch.core.runtime;
import org.springframework.batch.common.ExceptionClassifier;
import org.springframework.batch.repeat.ExitStatus;
import org.springframework.batch.support.ExceptionClassifier;
/**
* Extension of the {@link ExceptionClassifier} that explicitly deals with

View File

@@ -24,8 +24,8 @@ import org.springframework.batch.execution.repository.dao.JdbcStepExecutionDao;
import org.springframework.batch.execution.repository.dao.JobExecutionDao;
import org.springframework.batch.execution.repository.dao.JobInstanceDao;
import org.springframework.batch.execution.repository.dao.StepExecutionDao;
import org.springframework.batch.support.DataFieldMaxValueIncrementerFactory;
import org.springframework.batch.support.DefaultDataFieldMaxValueIncrementerFactory;
import org.springframework.batch.item.database.support.DataFieldMaxValueIncrementerFactory;
import org.springframework.batch.item.database.support.DefaultDataFieldMaxValueIncrementerFactory;
import org.springframework.beans.factory.FactoryBean;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.jdbc.core.JdbcTemplate;

View File

@@ -23,8 +23,8 @@ import org.springframework.batch.execution.step.ItemOrientedStep;
import org.springframework.batch.item.ItemReader;
import org.springframework.batch.item.ItemStream;
import org.springframework.batch.item.ItemWriter;
import org.springframework.batch.repeat.exception.handler.ExceptionHandler;
import org.springframework.batch.repeat.exception.handler.SimpleLimitExceptionHandler;
import org.springframework.batch.repeat.exception.ExceptionHandler;
import org.springframework.batch.repeat.exception.SimpleLimitExceptionHandler;
import org.springframework.batch.repeat.policy.SimpleCompletionPolicy;
import org.springframework.batch.repeat.support.RepeatTemplate;
import org.springframework.batch.repeat.support.TaskExecutorRepeatTemplate;

View File

@@ -22,12 +22,12 @@ import java.util.Iterator;
import java.util.List;
import java.util.Map;
import org.springframework.batch.common.ExceptionClassifier;
import org.springframework.batch.common.SubclassExceptionClassifier;
import org.springframework.batch.core.ItemSkipPolicy;
import org.springframework.batch.core.Step;
import org.springframework.batch.core.StepExecution;
import org.springframework.batch.item.file.FlatFileParseException;
import org.springframework.batch.support.ExceptionClassifier;
import org.springframework.batch.support.SubclassExceptionClassifier;
/**
* <p>

View File

@@ -16,7 +16,7 @@
package org.springframework.batch.execution.step.support;
import org.springframework.batch.repeat.RepeatContext;
import org.springframework.batch.repeat.exception.handler.ExceptionHandler;
import org.springframework.batch.repeat.exception.ExceptionHandler;
import org.springframework.batch.repeat.synch.RepeatSynchronizationManager;
import org.springframework.batch.retry.RetryCallback;
import org.springframework.batch.retry.RetryContext;

View File

@@ -16,8 +16,8 @@
package org.springframework.batch.execution.tasklet;
import org.springframework.batch.core.tasklet.Tasklet;
import org.springframework.batch.item.adapter.AbstractMethodInvokingDelegator;
import org.springframework.batch.repeat.ExitStatus;
import org.springframework.batch.support.AbstractMethodInvokingDelegator;
/**
* A {@link Tasklet} that wraps a method in a POJO. By default the

View File

@@ -46,7 +46,7 @@ import org.springframework.batch.item.AbstractItemReader;
import org.springframework.batch.item.ItemReader;
import org.springframework.batch.item.ItemWriter;
import org.springframework.batch.repeat.ExitStatus;
import org.springframework.batch.repeat.exception.handler.ExceptionHandler;
import org.springframework.batch.repeat.exception.ExceptionHandler;
import org.springframework.batch.retry.RetryPolicy;
import org.springframework.transaction.PlatformTransactionManager;

View File

@@ -20,7 +20,7 @@ import javax.sql.DataSource;
import junit.framework.TestCase;
import org.easymock.MockControl;
import org.springframework.batch.support.DataFieldMaxValueIncrementerFactory;
import org.springframework.batch.item.database.support.DataFieldMaxValueIncrementerFactory;
import org.springframework.dao.DataAccessException;
import org.springframework.jdbc.support.incrementer.DataFieldMaxValueIncrementer;

View File

@@ -40,7 +40,7 @@ import org.springframework.batch.item.ItemReader;
import org.springframework.batch.item.ItemWriter;
import org.springframework.batch.item.reader.ListItemReader;
import org.springframework.batch.repeat.RepeatContext;
import org.springframework.batch.repeat.exception.handler.ExceptionHandler;
import org.springframework.batch.repeat.exception.ExceptionHandler;
import org.springframework.batch.repeat.support.RepeatTemplate;
import org.springframework.batch.support.transaction.ResourcelessTransactionManager;
import org.springframework.batch.support.transaction.TransactionAwareProxyFactory;

View File

@@ -19,7 +19,7 @@ import junit.framework.TestCase;
import org.springframework.batch.repeat.RepeatContext;
import org.springframework.batch.repeat.context.RepeatContextSupport;
import org.springframework.batch.repeat.exception.handler.SimpleLimitExceptionHandler;
import org.springframework.batch.repeat.exception.SimpleLimitExceptionHandler;
import org.springframework.batch.repeat.synch.RepeatSynchronizationManager;
import org.springframework.batch.retry.RetryContext;
import org.springframework.batch.retry.RetryPolicy;

View File

@@ -1,7 +0,0 @@
<html>
<body>
<p>
Infrastructure implementations of common concerns.
</p>
</body>
</html>

View File

@@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.batch.support;
package org.springframework.batch.item.adapter;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;

View File

@@ -1,4 +1,4 @@
package org.springframework.batch.support;
package org.springframework.batch.item.adapter;
import org.springframework.util.MethodInvoker;

View File

@@ -21,7 +21,6 @@ import org.springframework.batch.item.ItemReader;
import org.springframework.batch.item.ItemStreamException;
import org.springframework.batch.item.MarkFailedException;
import org.springframework.batch.item.ResetFailedException;
import org.springframework.batch.support.AbstractMethodInvokingDelegator;
/**
* Invokes a custom method on a delegate plain old Java object which itself

View File

@@ -19,7 +19,6 @@ package org.springframework.batch.item.adapter;
import org.springframework.batch.item.ClearFailedException;
import org.springframework.batch.item.FlushFailedException;
import org.springframework.batch.item.ItemWriter;
import org.springframework.batch.support.AbstractMethodInvokingDelegator;
/**

View File

@@ -19,7 +19,6 @@ package org.springframework.batch.item.adapter;
import org.springframework.batch.item.ClearFailedException;
import org.springframework.batch.item.FlushFailedException;
import org.springframework.batch.item.ItemWriter;
import org.springframework.batch.support.AbstractMethodInvokingDelegator;
import org.springframework.beans.BeanWrapper;
import org.springframework.beans.BeanWrapperImpl;
import org.springframework.util.Assert;

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.batch.support;
package org.springframework.batch.item.database.support;
import org.springframework.jdbc.support.incrementer.DataFieldMaxValueIncrementer;

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.batch.support;
package org.springframework.batch.item.database.support;
import javax.sql.DataSource;

View File

@@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.batch.repeat.exception;
package org.springframework.batch.repeat;
import org.springframework.core.NestedRuntimeException;

View File

@@ -41,6 +41,6 @@ public interface RepeatOperations {
* indication of whether the {@link RepeatOperations} can continue
* processing if this method is called again.
*/
ExitStatus iterate(RepeatCallback callback);
ExitStatus iterate(RepeatCallback callback) throws RepeatException;
}

View File

@@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.batch.repeat.exception.handler;
package org.springframework.batch.repeat.exception;
import org.springframework.batch.repeat.RepeatContext;

View File

@@ -14,15 +14,13 @@
* limitations under the License.
*/
package org.springframework.batch.repeat.exception.handler;
package org.springframework.batch.repeat.exception;
import org.springframework.batch.repeat.RepeatContext;
import org.springframework.batch.repeat.exception.RepeatException;
import org.springframework.batch.repeat.RepeatException;
/**
* Default implementation of {@link ExceptionHandler} - just re-throws the first
* exception it encounters.
* Default implementation of {@link ExceptionHandler} - just re-throws the first exception it encounters.
*
* @author Dave Syer
*
@@ -30,12 +28,11 @@ import org.springframework.batch.repeat.exception.RepeatException;
public class DefaultExceptionHandler implements ExceptionHandler {
/**
* Rethrow the throwable in the collection's iterator. Wrap in a
* {@link RepeatException} if the first instance is not a
* {@link RuntimeException}.
* Rethrow the throwable in the collection's iterator. Wrap in a {@link RepeatException} if the first instance is
* not a {@link RuntimeException}.
*
* @see org.springframework.batch.repeat.exception.handler.ExceptionHandler#handleException(RepeatContext,
* Throwable)
* @see org.springframework.batch.repeat.exception.ExceptionHandler#handleException(RepeatContext,
* Throwable)
*/
public void handleException(RepeatContext context, Throwable throwable) throws RuntimeException {
@@ -44,18 +41,17 @@ public class DefaultExceptionHandler implements ExceptionHandler {
}
/**
* Convenience method to rethrow the Throwable instance. Wraps it in a
* {@link RepeatException} if it is not a {@link Exception}.
* Convenience method to rethrow the Throwable instance. Wraps it in a {@link RepeatException} if it is not a
* {@link Exception}.
*
* @param throwable a Throwable.
* @throws RuntimeException if the throwable is a {@link RuntimeException} just
* rethrow, otherwise wrap in a {@link RepeatException}
* @throws RuntimeException if the throwable is a {@link RuntimeException} just rethrow, otherwise wrap in a
* {@link RepeatException}
*/
public static void rethrow(Throwable throwable) throws RuntimeException {
if (throwable instanceof RuntimeException) {
throw (RuntimeException) throwable;
}
else {
} else {
throw new RepeatException("Exception in batch process", throwable);
}
}

View File

@@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.batch.repeat.exception.handler;
package org.springframework.batch.repeat.exception;
import org.springframework.batch.repeat.CompletionPolicy;
import org.springframework.batch.repeat.RepeatContext;

View File

@@ -14,20 +14,19 @@
* limitations under the License.
*/
package org.springframework.batch.repeat.exception.handler;
package org.springframework.batch.repeat.exception;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.batch.common.ExceptionClassifier;
import org.springframework.batch.common.ExceptionClassifierSupport;
import org.springframework.batch.repeat.RepeatContext;
import org.springframework.batch.repeat.exception.RepeatException;
import org.springframework.batch.repeat.RepeatException;
import org.springframework.batch.support.ExceptionClassifier;
import org.springframework.batch.support.ExceptionClassifierSupport;
/**
* Implementation of {@link ExceptionHandler} based on an
* {@link ExceptionClassifier}. The classifier determines whether to log the
* exception or rethrow it. The keys in the classifier must be the same as the
* static contants in this class.
* Implementation of {@link ExceptionHandler} based on an {@link ExceptionClassifier}. The classifier determines
* whether to log the exception or rethrow it. The keys in the classifier must be the same as the static contants in
* this class.
*
* @author Dave Syer
*
@@ -35,32 +34,27 @@ import org.springframework.batch.repeat.exception.RepeatException;
public class LogOrRethrowExceptionHandler implements ExceptionHandler {
/**
* Key for {@link ExceptionClassifier} signalling that the throwable should
* be rethrown. If the throwable is not a RuntimeException it is wrapped in
* a {@link RepeatException}.
* Key for {@link ExceptionClassifier} signalling that the throwable should be rethrown. If the throwable is not a
* RuntimeException it is wrapped in a {@link RepeatException}.
*/
public static final String RETHROW = "rethrow";
/**
* Key for {@link ExceptionClassifier} signalling that the throwable should
* be logged at debug level.
* Key for {@link ExceptionClassifier} signalling that the throwable should be logged at debug level.
*/
public static final String DEBUG = "debug";
/**
* Key for {@link ExceptionClassifier} signalling that the throwable should
* be logged at warn level.
* Key for {@link ExceptionClassifier} signalling that the throwable should be logged at warn level.
*/
public static final String WARN = "warn";
/**
* Key for {@link ExceptionClassifier} signalling that the throwable should
* be logged at error level.
* Key for {@link ExceptionClassifier} signalling that the throwable should be logged at error level.
*/
public static final String ERROR = "error";
protected final Log logger = LogFactory
.getLog(LogOrRethrowExceptionHandler.class);
protected final Log logger = LogFactory.getLog(LogOrRethrowExceptionHandler.class);
private ExceptionClassifier exceptionClassifier = new ExceptionClassifierSupport() {
public Object classify(Throwable throwable) {
@@ -69,8 +63,8 @@ public class LogOrRethrowExceptionHandler implements ExceptionHandler {
};
/**
* Setter for the {@link ExceptionClassifier} used by this handler. The
* default is to map all throwable instances to {@value #RETHROW}.
* Setter for the {@link ExceptionClassifier} used by this handler. The default is to map all throwable instances to
* {@value #RETHROW}.
*
* @param exceptionClassifier
*/
@@ -79,15 +73,13 @@ public class LogOrRethrowExceptionHandler implements ExceptionHandler {
}
/**
* Classify the throwables and decide whether to rethrow based on the
* result. The context is not used.
* Classify the throwables and decide whether to rethrow based on the result. The context is not used.
*
* @throws RuntimeException
*
* @see {@link ExceptionHandler#handleException(RepeatContext, Throwable)}
*/
public void handleException(RepeatContext context, Throwable throwable)
throws RuntimeException {
public void handleException(RepeatContext context, Throwable throwable) throws RuntimeException {
Object key = exceptionClassifier.classify(throwable);
if (ERROR.equals(key)) {
@@ -100,8 +92,7 @@ public class LogOrRethrowExceptionHandler implements ExceptionHandler {
DefaultExceptionHandler.rethrow(throwable);
} else {
throw new IllegalStateException(
"Unclassified exception encountered. Did you mean to classifiy this as 'rethrow'?",
throwable);
"Unclassified exception encountered. Did you mean to classifiy this as 'rethrow'?", throwable);
}
}

View File

@@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.batch.repeat.exception.handler;
package org.springframework.batch.repeat.exception;
import java.util.HashMap;
import java.util.Iterator;
@@ -22,10 +22,10 @@ import java.util.Map;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.batch.common.ExceptionClassifier;
import org.springframework.batch.common.ExceptionClassifierSupport;
import org.springframework.batch.repeat.RepeatContext;
import org.springframework.batch.repeat.context.RepeatContextCounter;
import org.springframework.batch.support.ExceptionClassifier;
import org.springframework.batch.support.ExceptionClassifierSupport;
import org.springframework.util.Assert;
/**

View File

@@ -14,12 +14,12 @@
* limitations under the License.
*/
package org.springframework.batch.repeat.exception.handler;
package org.springframework.batch.repeat.exception;
import java.util.HashMap;
import org.springframework.batch.common.ExceptionClassifierSupport;
import org.springframework.batch.repeat.RepeatContext;
import org.springframework.batch.support.ExceptionClassifierSupport;
/**
* Simple implementation of exception handler which looks for one exception
@@ -83,7 +83,7 @@ public class SimpleLimitExceptionHandler implements ExceptionHandler {
* @see #setType(Class)
* @see #setLimit(int)
*
* @see org.springframework.batch.repeat.exception.handler.ExceptionHandler#handleException(org.springframework.batch.repeat.RepeatContext,
* @see org.springframework.batch.repeat.exception.ExceptionHandler#handleException(org.springframework.batch.repeat.RepeatContext,
* Throwable)
*/
public void handleException(RepeatContext context, Throwable throwable) throws RuntimeException {

View File

@@ -1,7 +0,0 @@
<html>
<body>
<p>
Infrastructure implementations of repeat exception handler concerns.
</p>
</body>
</html>

View File

@@ -1,7 +1,7 @@
<html>
<body>
<p>
Infrastructure implementations of repeat exception concerns.
Infrastructure implementations of repeat exception handler concerns.
</p>
</body>
</html>

View File

@@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.batch.repeat.aop;
package org.springframework.batch.repeat.interceptor;
import org.aopalliance.intercept.MethodInterceptor;
import org.aopalliance.intercept.MethodInvocation;
@@ -22,8 +22,8 @@ import org.springframework.aop.ProxyMethodInvocation;
import org.springframework.batch.repeat.ExitStatus;
import org.springframework.batch.repeat.RepeatCallback;
import org.springframework.batch.repeat.RepeatContext;
import org.springframework.batch.repeat.RepeatException;
import org.springframework.batch.repeat.RepeatOperations;
import org.springframework.batch.repeat.exception.RepeatException;
import org.springframework.batch.repeat.support.RepeatTemplate;
import org.springframework.util.Assert;

View File

@@ -27,11 +27,11 @@ import org.springframework.batch.repeat.CompletionPolicy;
import org.springframework.batch.repeat.ExitStatus;
import org.springframework.batch.repeat.RepeatCallback;
import org.springframework.batch.repeat.RepeatContext;
import org.springframework.batch.repeat.RepeatException;
import org.springframework.batch.repeat.RepeatListener;
import org.springframework.batch.repeat.RepeatOperations;
import org.springframework.batch.repeat.exception.RepeatException;
import org.springframework.batch.repeat.exception.handler.DefaultExceptionHandler;
import org.springframework.batch.repeat.exception.handler.ExceptionHandler;
import org.springframework.batch.repeat.exception.DefaultExceptionHandler;
import org.springframework.batch.repeat.exception.ExceptionHandler;
import org.springframework.batch.repeat.policy.DefaultResultCompletionPolicy;
import org.springframework.batch.repeat.synch.RepeatSynchronizationManager;
import org.springframework.util.Assert;

View File

@@ -21,8 +21,8 @@ import java.util.List;
import org.springframework.batch.repeat.ExitStatus;
import org.springframework.batch.repeat.RepeatCallback;
import org.springframework.batch.repeat.RepeatContext;
import org.springframework.batch.repeat.RepeatException;
import org.springframework.batch.repeat.RepeatOperations;
import org.springframework.batch.repeat.exception.RepeatException;
import org.springframework.core.task.SyncTaskExecutor;
import org.springframework.core.task.TaskExecutor;
import org.springframework.util.Assert;

View File

@@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.batch.retry.exception;
package org.springframework.batch.retry;
public class ExhaustedRetryException extends RetryException {

View File

@@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.batch.retry.exception;
package org.springframework.batch.retry;
import org.springframework.core.NestedRuntimeException;

View File

@@ -16,7 +16,6 @@
package org.springframework.batch.retry;
import org.springframework.batch.retry.exception.TerminatedRetryException;
/**
* Interface for listener that can be used to add behaviour to a retry.

View File

@@ -16,7 +16,6 @@
package org.springframework.batch.retry;
import org.springframework.batch.retry.exception.TerminatedRetryException;
/**
* A {@link RetryPolicy} is responsible for allocating and managing resources
@@ -81,5 +80,5 @@ public interface RetryPolicy {
*
* @throws Exception if there is no recovery path.
*/
Object handleRetryExhausted(RetryContext context) throws Exception;
Object handleRetryExhausted(RetryContext context) throws Exception, ExhaustedRetryException;
}

View File

@@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.batch.retry.exception;
package org.springframework.batch.retry;
public class TerminatedRetryException extends RetryException {

View File

@@ -14,9 +14,9 @@
* limitations under the License.
*/
package org.springframework.batch.retry.exception;
package org.springframework.batch.retry.backoff;
import org.springframework.batch.retry.backoff.BackOffPolicy;
import org.springframework.batch.retry.RetryException;
/**
* Exception class signifiying that an attempt to back off using a

View File

@@ -17,7 +17,6 @@
package org.springframework.batch.retry.backoff;
import org.springframework.batch.retry.RetryContext;
import org.springframework.batch.retry.exception.BackOffInterruptedException;
/**
* Strategy interface to control back off between attempts in a single

View File

@@ -17,7 +17,6 @@
package org.springframework.batch.retry.backoff;
import org.springframework.batch.retry.RetryContext;
import org.springframework.batch.retry.exception.BackOffInterruptedException;
import org.springframework.util.ClassUtils;
/**

View File

@@ -16,7 +16,6 @@
package org.springframework.batch.retry.backoff;
import org.springframework.batch.retry.exception.BackOffInterruptedException;
/**
* Implementation of {@link BackOffPolicy} that pauses for a fixed period of

View File

@@ -16,7 +16,6 @@
package org.springframework.batch.retry.backoff;
import org.springframework.batch.retry.exception.BackOffInterruptedException;
/**
* Implementation of {@link BackOffPolicy} that performs a no-op and as such all

View File

@@ -17,7 +17,6 @@
package org.springframework.batch.retry.backoff;
import org.springframework.batch.retry.RetryContext;
import org.springframework.batch.retry.exception.BackOffInterruptedException;
/**
* Simple base class for {@link BackOffPolicy} implementations that maintain no

View File

@@ -22,11 +22,11 @@ import org.springframework.batch.item.ItemKeyGenerator;
import org.springframework.batch.item.ItemReader;
import org.springframework.batch.item.ItemRecoverer;
import org.springframework.batch.item.ItemWriter;
import org.springframework.batch.retry.ExhaustedRetryException;
import org.springframework.batch.retry.RetryCallback;
import org.springframework.batch.retry.RetryContext;
import org.springframework.batch.retry.RetryException;
import org.springframework.batch.retry.RetryPolicy;
import org.springframework.batch.retry.exception.ExhaustedRetryException;
import org.springframework.batch.retry.exception.RetryException;
import org.springframework.batch.retry.policy.ItemReaderRetryPolicy;
/**

View File

@@ -1,7 +0,0 @@
<html>
<body>
<p>
Infrastructure implementations of retry exception concerns.
</p>
</body>
</html>

View File

@@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.batch.retry.aop;
package org.springframework.batch.retry.interceptor;
import org.aopalliance.intercept.MethodInterceptor;
import org.aopalliance.intercept.MethodInvocation;

View File

@@ -16,9 +16,9 @@
package org.springframework.batch.retry.policy;
import org.springframework.batch.retry.ExhaustedRetryException;
import org.springframework.batch.retry.RetryContext;
import org.springframework.batch.retry.RetryPolicy;
import org.springframework.batch.retry.exception.ExhaustedRetryException;
/**
* Base class for "normal" retry policies: those that operate in the context of
@@ -49,7 +49,7 @@ public abstract class AbstractStatelessRetryPolicy implements RetryPolicy {
*
* @see org.springframework.batch.retry.RetryPolicy#handleRetryExhausted(org.springframework.batch.retry.RetryContext)
*/
public Object handleRetryExhausted(RetryContext context) throws Exception {
public Object handleRetryExhausted(RetryContext context) throws Exception, ExhaustedRetryException {
throw new ExhaustedRetryException("Retry exhausted after last attempt with no recovery path.", context
.getLastThrowable());
}

View File

@@ -22,8 +22,8 @@ import java.util.List;
import org.springframework.batch.retry.RetryCallback;
import org.springframework.batch.retry.RetryContext;
import org.springframework.batch.retry.RetryPolicy;
import org.springframework.batch.retry.TerminatedRetryException;
import org.springframework.batch.retry.context.RetryContextSupport;
import org.springframework.batch.retry.exception.TerminatedRetryException;
import org.springframework.batch.retry.synch.RetrySynchronizationManager;
/**

View File

@@ -20,14 +20,14 @@ import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
import org.springframework.batch.common.ExceptionClassifier;
import org.springframework.batch.common.ExceptionClassifierSupport;
import org.springframework.batch.retry.RetryCallback;
import org.springframework.batch.retry.RetryContext;
import org.springframework.batch.retry.RetryPolicy;
import org.springframework.batch.retry.TerminatedRetryException;
import org.springframework.batch.retry.context.RetryContextSupport;
import org.springframework.batch.retry.exception.TerminatedRetryException;
import org.springframework.batch.retry.synch.RetrySynchronizationManager;
import org.springframework.batch.support.ExceptionClassifier;
import org.springframework.batch.support.ExceptionClassifierSupport;
import org.springframework.util.Assert;
/**

View File

@@ -26,9 +26,9 @@ import org.springframework.batch.repeat.synch.RepeatSynchronizationManager;
import org.springframework.batch.retry.RetryCallback;
import org.springframework.batch.retry.RetryContext;
import org.springframework.batch.retry.RetryPolicy;
import org.springframework.batch.retry.TerminatedRetryException;
import org.springframework.batch.retry.callback.ItemReaderRetryCallback;
import org.springframework.batch.retry.context.RetryContextSupport;
import org.springframework.batch.retry.exception.TerminatedRetryException;
import org.springframework.batch.retry.synch.RetrySynchronizationManager;
import org.springframework.util.Assert;

View File

@@ -19,8 +19,8 @@ package org.springframework.batch.retry.policy;
import org.springframework.batch.retry.RetryCallback;
import org.springframework.batch.retry.RetryContext;
import org.springframework.batch.retry.RetryPolicy;
import org.springframework.batch.retry.TerminatedRetryException;
import org.springframework.batch.retry.context.RetryContextSupport;
import org.springframework.batch.retry.exception.TerminatedRetryException;
import org.springframework.batch.retry.synch.RetrySynchronizationManager;
/**

View File

@@ -16,12 +16,12 @@
package org.springframework.batch.retry.policy;
import org.springframework.batch.common.BinaryExceptionClassifier;
import org.springframework.batch.repeat.RepeatContext;
import org.springframework.batch.retry.RetryCallback;
import org.springframework.batch.retry.RetryContext;
import org.springframework.batch.retry.context.RetryContextSupport;
import org.springframework.batch.retry.synch.RetrySynchronizationManager;
import org.springframework.batch.support.BinaryExceptionClassifier;
/**
*

View File

@@ -19,8 +19,8 @@ package org.springframework.batch.retry.policy;
import org.springframework.batch.retry.RetryCallback;
import org.springframework.batch.retry.RetryContext;
import org.springframework.batch.retry.RetryPolicy;
import org.springframework.batch.retry.TerminatedRetryException;
import org.springframework.batch.retry.context.RetryContextSupport;
import org.springframework.batch.retry.exception.TerminatedRetryException;
import org.springframework.batch.retry.synch.RetrySynchronizationManager;
/**

View File

@@ -27,11 +27,11 @@ import org.springframework.batch.retry.RetryContext;
import org.springframework.batch.retry.RetryListener;
import org.springframework.batch.retry.RetryOperations;
import org.springframework.batch.retry.RetryPolicy;
import org.springframework.batch.retry.TerminatedRetryException;
import org.springframework.batch.retry.backoff.BackOffContext;
import org.springframework.batch.retry.backoff.BackOffInterruptedException;
import org.springframework.batch.retry.backoff.BackOffPolicy;
import org.springframework.batch.retry.backoff.NoBackOffPolicy;
import org.springframework.batch.retry.exception.BackOffInterruptedException;
import org.springframework.batch.retry.exception.TerminatedRetryException;
import org.springframework.batch.retry.policy.SimpleRetryPolicy;
import org.springframework.batch.retry.synch.RetrySynchronizationManager;

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.batch.common;
package org.springframework.batch.support;
import java.util.HashMap;
import java.util.Map;

View File

@@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.batch.common;
package org.springframework.batch.support;
/**
* Interface for a classifier of exceptions.

View File

@@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.batch.common;
package org.springframework.batch.support;
/**
* Base class for {@link ExceptionClassifier} implementations. Provides default
@@ -33,7 +33,7 @@ public class ExceptionClassifierSupport implements ExceptionClassifier {
/**
* Always returns the value of {@value #DEFAULT}.
*
* @see org.springframework.batch.common.ExceptionClassifier#classify(java.lang.Throwable)
* @see org.springframework.batch.support.ExceptionClassifier#classify(java.lang.Throwable)
*/
public Object classify(Throwable throwable) {
return DEFAULT;
@@ -42,7 +42,7 @@ public class ExceptionClassifierSupport implements ExceptionClassifier {
/**
* Wrapper for a call to {@link #classify(Throwable)} with argument null.
*
* @see org.springframework.batch.common.ExceptionClassifier#getDefault()
* @see org.springframework.batch.support.ExceptionClassifier#getDefault()
*/
public Object getDefault() {
return classify(null);

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.batch.common;
package org.springframework.batch.support;
import java.util.Comparator;
import java.util.HashMap;
@@ -53,7 +53,7 @@ public class SubclassExceptionClassifier extends ExceptionClassifierSupport {
* Return the value from the type map whose key is the class of the given
* Throwable, or its nearest ancestor if a subclass.
*
* @see org.springframework.batch.common.ExceptionClassifierSupport#classify(java.lang.Throwable)
* @see org.springframework.batch.support.ExceptionClassifierSupport#classify(java.lang.Throwable)
*/
public Object classify(Throwable throwable) {

View File

@@ -16,7 +16,7 @@
package org.springframework.batch.item;
import org.springframework.batch.common.AbstractExceptionTests;
import org.springframework.batch.support.AbstractExceptionTests;
public class ItemStreamExceptionTests extends AbstractExceptionTests {

View File

@@ -16,7 +16,7 @@
package org.springframework.batch.item;
import org.springframework.batch.common.AbstractExceptionTests;
import org.springframework.batch.support.AbstractExceptionTests;
public class MarkFailedExceptionTests extends AbstractExceptionTests {

View File

@@ -16,7 +16,7 @@
package org.springframework.batch.item;
import org.springframework.batch.common.AbstractExceptionTests;
import org.springframework.batch.support.AbstractExceptionTests;
public class ResetFailedExceptionTests extends AbstractExceptionTests {

View File

@@ -16,7 +16,7 @@
package org.springframework.batch.item;
import org.springframework.batch.repeat.exception.AbstractExceptionTests;
import org.springframework.batch.repeat.AbstractExceptionTests;
public class UnexpectedInputExceptionTests extends AbstractExceptionTests {

View File

@@ -1,7 +1,9 @@
package org.springframework.batch.support;
package org.springframework.batch.item.adapter;
import junit.framework.TestCase;
import org.springframework.batch.item.adapter.AbstractMethodInvokingDelegator;
import org.springframework.batch.item.adapter.DynamicMethodInvocationException;
import org.springframework.batch.item.sample.Foo;
import org.springframework.batch.item.sample.FooService;
import org.springframework.util.Assert;

View File

@@ -13,13 +13,14 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.batch.support;
package org.springframework.batch.item.database.support;
import javax.sql.DataSource;
import junit.framework.TestCase;
import org.easymock.MockControl;
import org.springframework.batch.item.database.support.DefaultDataFieldMaxValueIncrementerFactory;
import org.springframework.jdbc.support.incrementer.DB2SequenceMaxValueIncrementer;
import org.springframework.jdbc.support.incrementer.DerbyMaxValueIncrementer;
import org.springframework.jdbc.support.incrementer.HsqlMaxValueIncrementer;

View File

@@ -16,7 +16,7 @@
package org.springframework.batch.item.file;
import org.springframework.batch.common.AbstractExceptionTests;
import org.springframework.batch.support.AbstractExceptionTests;
public class FlatFileParseExceptionTests extends AbstractExceptionTests {

View File

@@ -16,7 +16,7 @@
package org.springframework.batch.item.validator;
import org.springframework.batch.repeat.exception.AbstractExceptionTests;
import org.springframework.batch.repeat.AbstractExceptionTests;
public class ValidationExceptionTests extends AbstractExceptionTests {

View File

@@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.batch.retry.exception;
package org.springframework.batch.repeat;
import junit.framework.TestCase;

View File

@@ -14,7 +14,9 @@
* limitations under the License.
*/
package org.springframework.batch.repeat.exception;
package org.springframework.batch.repeat;
import org.springframework.batch.repeat.RepeatException;
public class RepeatExceptionTests extends AbstractExceptionTests {

View File

@@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.batch.repeat.exception.handler;
package org.springframework.batch.repeat.exception;
import java.util.ArrayList;
import java.util.List;
@@ -22,6 +22,8 @@ import java.util.List;
import junit.framework.TestCase;
import org.springframework.batch.repeat.RepeatContext;
import org.springframework.batch.repeat.exception.CompositeExceptionHandler;
import org.springframework.batch.repeat.exception.ExceptionHandler;
public class CompositeExceptionHandlerTests extends TestCase {

View File

@@ -14,12 +14,13 @@
* limitations under the License.
*/
package org.springframework.batch.repeat.exception.handler;
package org.springframework.batch.repeat.exception;
import junit.framework.TestCase;
import org.springframework.batch.repeat.RepeatContext;
import org.springframework.batch.repeat.exception.RepeatException;
import org.springframework.batch.repeat.RepeatException;
import org.springframework.batch.repeat.exception.DefaultExceptionHandler;
public class DefaultExceptionHandlerTests extends TestCase {

View File

@@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.batch.repeat.exception.handler;
package org.springframework.batch.repeat.exception;
import java.io.StringWriter;
@@ -24,9 +24,10 @@ import org.apache.log4j.Level;
import org.apache.log4j.Logger;
import org.apache.log4j.SimpleLayout;
import org.apache.log4j.WriterAppender;
import org.springframework.batch.common.ExceptionClassifierSupport;
import org.springframework.batch.repeat.RepeatContext;
import org.springframework.batch.repeat.exception.RepeatException;
import org.springframework.batch.repeat.RepeatException;
import org.springframework.batch.repeat.exception.LogOrRethrowExceptionHandler;
import org.springframework.batch.support.ExceptionClassifierSupport;
public class LogOrRethrowExceptionHandlerTests extends TestCase {

View File

@@ -14,17 +14,18 @@
* limitations under the License.
*/
package org.springframework.batch.repeat.exception.handler;
package org.springframework.batch.repeat.exception;
import java.util.Collections;
import junit.framework.TestCase;
import org.springframework.batch.common.ExceptionClassifierSupport;
import org.springframework.batch.repeat.RepeatContext;
import org.springframework.batch.repeat.RepeatException;
import org.springframework.batch.repeat.context.RepeatContextCounter;
import org.springframework.batch.repeat.context.RepeatContextSupport;
import org.springframework.batch.repeat.exception.RepeatException;
import org.springframework.batch.repeat.exception.RethrowOnThresholdExceptionHandler;
import org.springframework.batch.support.ExceptionClassifierSupport;
public class RethrowOnThresholdExceptionHandlerTests extends TestCase {

View File

@@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.batch.repeat.exception.handler;
package org.springframework.batch.repeat.exception;
import java.util.ArrayList;
import java.util.Iterator;
@@ -23,6 +23,7 @@ import java.util.List;
import junit.framework.TestCase;
import org.springframework.batch.repeat.context.RepeatContextSupport;
import org.springframework.batch.repeat.exception.SimpleLimitExceptionHandler;
/**
* Unit tests for {@link SimpleLimitExceptionHandler}

View File

@@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.batch.repeat.aop;
package org.springframework.batch.repeat.interceptor;
import java.lang.reflect.AccessibleObject;
import java.lang.reflect.Method;
@@ -29,8 +29,9 @@ import org.springframework.aop.framework.Advised;
import org.springframework.aop.framework.ProxyFactory;
import org.springframework.batch.repeat.ExitStatus;
import org.springframework.batch.repeat.RepeatCallback;
import org.springframework.batch.repeat.RepeatException;
import org.springframework.batch.repeat.RepeatOperations;
import org.springframework.batch.repeat.exception.RepeatException;
import org.springframework.batch.repeat.interceptor.RepeatOperationsInterceptor;
import org.springframework.batch.repeat.policy.SimpleCompletionPolicy;
import org.springframework.batch.repeat.support.RepeatTemplate;

View File

@@ -25,7 +25,7 @@ import org.springframework.batch.repeat.RepeatContext;
import org.springframework.batch.repeat.callback.ItemReaderRepeatCallback;
import org.springframework.batch.repeat.callback.NestedRepeatCallback;
import org.springframework.batch.repeat.context.RepeatContextSupport;
import org.springframework.batch.repeat.exception.handler.ExceptionHandler;
import org.springframework.batch.repeat.exception.ExceptionHandler;
import org.springframework.batch.repeat.policy.CompletionPolicySupport;
import org.springframework.batch.repeat.policy.SimpleCompletionPolicy;
import org.springframework.batch.repeat.synch.RepeatSynchronizationManager;

View File

@@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.batch.repeat.exception;
package org.springframework.batch.retry;
import junit.framework.TestCase;

View File

@@ -14,7 +14,9 @@
* limitations under the License.
*/
package org.springframework.batch.retry.exception;
package org.springframework.batch.retry;
import org.springframework.batch.retry.backoff.BackOffInterruptedException;
public class BackOffInterruptedExceptionTests extends AbstractExceptionTests {

View File

@@ -14,7 +14,9 @@
* limitations under the License.
*/
package org.springframework.batch.retry.exception;
package org.springframework.batch.retry;
import org.springframework.batch.retry.ExhaustedRetryException;
public class ExhaustedRetryExceptionTests extends AbstractExceptionTests {

View File

@@ -14,7 +14,9 @@
* limitations under the License.
*/
package org.springframework.batch.retry.exception;
package org.springframework.batch.retry;
import org.springframework.batch.retry.RetryException;
public class RetryExceptionTests extends AbstractExceptionTests {

View File

@@ -14,7 +14,9 @@
* limitations under the License.
*/
package org.springframework.batch.retry.exception;
package org.springframework.batch.retry;
import org.springframework.batch.retry.TerminatedRetryException;
public class TerminatedRetryExceptionTests extends AbstractExceptionTests {

View File

@@ -25,9 +25,9 @@ import junit.framework.TestCase;
import org.springframework.batch.item.AbstractItemWriter;
import org.springframework.batch.retry.ListItemReaderRecoverer;
import org.springframework.batch.retry.RetryContext;
import org.springframework.batch.retry.RetryException;
import org.springframework.batch.retry.TerminatedRetryException;
import org.springframework.batch.retry.context.RetryContextSupport;
import org.springframework.batch.retry.exception.RetryException;
import org.springframework.batch.retry.exception.TerminatedRetryException;
import org.springframework.batch.retry.policy.NeverRetryPolicy;
import org.springframework.batch.retry.support.RetryTemplate;

View File

@@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.batch.retry.aop;
package org.springframework.batch.retry.interceptor;
import java.lang.reflect.AccessibleObject;
import java.lang.reflect.Method;
@@ -28,6 +28,7 @@ import org.aopalliance.intercept.MethodInvocation;
import org.springframework.aop.framework.Advised;
import org.springframework.aop.framework.ProxyFactory;
import org.springframework.aop.target.SingletonTargetSource;
import org.springframework.batch.retry.interceptor.RetryOperationsInterceptor;
import org.springframework.batch.retry.policy.NeverRetryPolicy;
import org.springframework.batch.retry.policy.SimpleRetryPolicy;
import org.springframework.batch.retry.support.RetryTemplate;

View File

@@ -24,7 +24,7 @@ import junit.framework.TestCase;
import org.springframework.batch.retry.RetryCallback;
import org.springframework.batch.retry.RetryContext;
import org.springframework.batch.retry.RetryListener;
import org.springframework.batch.retry.exception.TerminatedRetryException;
import org.springframework.batch.retry.TerminatedRetryException;
import org.springframework.batch.retry.policy.NeverRetryPolicy;
import org.springframework.batch.retry.support.RetryTemplate;

View File

@@ -23,7 +23,7 @@ import junit.framework.TestCase;
import org.springframework.batch.retry.RetryContext;
import org.springframework.batch.retry.RetryPolicy;
import org.springframework.batch.retry.exception.TerminatedRetryException;
import org.springframework.batch.retry.TerminatedRetryException;
import org.springframework.batch.retry.synch.RetrySynchronizationManager;
public class CompositeRetryPolicyTests extends TestCase {

View File

@@ -22,9 +22,9 @@ import java.util.Map;
import junit.framework.TestCase;
import org.springframework.batch.common.ExceptionClassifierSupport;
import org.springframework.batch.retry.RetryContext;
import org.springframework.batch.retry.synch.RetrySynchronizationManager;
import org.springframework.batch.support.ExceptionClassifierSupport;
public class ExceptionClassifierRetryPolicyTests extends TestCase {

View File

@@ -22,8 +22,8 @@ import junit.framework.TestCase;
import org.springframework.batch.retry.RetryCallback;
import org.springframework.batch.retry.RetryContext;
import org.springframework.batch.retry.TerminatedRetryException;
import org.springframework.batch.retry.context.RetryContextSupport;
import org.springframework.batch.retry.exception.TerminatedRetryException;
import org.springframework.batch.retry.support.RetryTemplate;
public class ExternalRetryPolicyTests extends TestCase {

View File

@@ -18,13 +18,13 @@ package org.springframework.batch.retry.support;
import junit.framework.TestCase;
import org.springframework.batch.retry.ExhaustedRetryException;
import org.springframework.batch.retry.RetryCallback;
import org.springframework.batch.retry.RetryContext;
import org.springframework.batch.retry.backoff.BackOffContext;
import org.springframework.batch.retry.backoff.BackOffInterruptedException;
import org.springframework.batch.retry.backoff.BackOffPolicy;
import org.springframework.batch.retry.backoff.StatelessBackOffPolicy;
import org.springframework.batch.retry.exception.BackOffInterruptedException;
import org.springframework.batch.retry.exception.ExhaustedRetryException;
import org.springframework.batch.retry.policy.NeverRetryPolicy;
import org.springframework.batch.retry.policy.SimpleRetryPolicy;
import org.springframework.batch.retry.synch.RetrySynchronizationManager;

View File

@@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.batch.common;
package org.springframework.batch.support;
import junit.framework.TestCase;

View File

@@ -14,7 +14,9 @@
* limitations under the License.
*/
package org.springframework.batch.common;
package org.springframework.batch.support;
import org.springframework.batch.support.BinaryExceptionClassifier;
import junit.framework.TestCase;

View File

@@ -14,7 +14,9 @@
* limitations under the License.
*/
package org.springframework.batch.common;
package org.springframework.batch.support;
import org.springframework.batch.support.ExceptionClassifierSupport;
import junit.framework.TestCase;

View File

@@ -14,11 +14,13 @@
* limitations under the License.
*/
package org.springframework.batch.common;
package org.springframework.batch.support;
import java.util.Collections;
import java.util.LinkedHashMap;
import org.springframework.batch.support.SubclassExceptionClassifier;
import junit.framework.TestCase;
public class SubclassExceptionClassifierTests extends TestCase {

View File

@@ -18,10 +18,10 @@
</aop:config>
<bean id="bean"
class="org.springframework.batch.retry.aop.RetryOperationsInterceptorTests$ServiceImpl" />
class="org.springframework.batch.retry.interceptor.RetryOperationsInterceptorTests$ServiceImpl" />
<bean id="retryAdvice"
class="org.springframework.batch.retry.aop.RetryOperationsInterceptor"/>
class="org.springframework.batch.retry.interceptor.RetryOperationsInterceptor"/>
<tx:advice id="txAdvice" transaction-manager="transactionManager">
<tx:attributes>

View File

@@ -3,7 +3,7 @@ package org.springframework.batch.sample.exception.handler;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.batch.repeat.RepeatContext;
import org.springframework.batch.repeat.exception.handler.ExceptionHandler;
import org.springframework.batch.repeat.exception.ExceptionHandler;
public class FootballExceptionHandler implements ExceptionHandler {