OPEN - issue BATCH-789: Remove mark/reset from ItemReader

Removed all code from mark() and reset() implementations
This commit is contained in:
dsyer
2008-08-21 11:03:44 +00:00
parent 04db13bbc4
commit e1d1413cc3
24 changed files with 92 additions and 532 deletions

View File

@@ -26,8 +26,6 @@ import org.springframework.batch.core.StepContribution;
import org.springframework.batch.item.ItemProcessor;
import org.springframework.batch.item.ItemReader;
import org.springframework.batch.item.ItemWriter;
import org.springframework.batch.item.MarkFailedException;
import org.springframework.batch.item.ResetFailedException;
import org.springframework.batch.repeat.ExitStatus;
import org.springframework.batch.repeat.RepeatCallback;
import org.springframework.batch.repeat.RepeatContext;
@@ -180,20 +178,6 @@ public class ItemOrientedStepHandler<T, S> implements StepHandler {
itemWriter.write(Collections.singletonList(item));
}
/**
* @throws MarkFailedException
*/
public void mark() throws MarkFailedException {
itemReader.mark();
}
/**
* @throws ResetFailedException
*/
public void reset() throws ResetFailedException {
itemReader.reset();
}
/**
* @author Dave Syer
*

View File

@@ -18,8 +18,6 @@ package org.springframework.batch.core.step.item;
import org.springframework.batch.core.StepContribution;
import org.springframework.batch.item.ItemReader;
import org.springframework.batch.item.ItemWriter;
import org.springframework.batch.item.MarkFailedException;
import org.springframework.batch.item.ResetFailedException;
import org.springframework.batch.repeat.ExitStatus;
/**
@@ -45,16 +43,4 @@ public interface StepHandler {
*/
ExitStatus handle(StepContribution contribution) throws Exception;
/**
* Implementations should delegate to an {@link ItemReader}.
*
*/
void mark() throws MarkFailedException;
/**
* Implementations should delegate to an {@link ItemReader}.
*
*/
void reset() throws ResetFailedException;
}

View File

@@ -205,7 +205,6 @@ public class StepHandlerStep extends AbstractStep {
protected ExitStatus doExecute(final StepExecution stepExecution) throws Exception {
stream.update(stepExecution.getExecutionContext());
getJobRepository().updateExecutionContext(stepExecution);
itemHandler.mark();
final ExceptionHolder fatalException = new ExceptionHolder();
@@ -281,7 +280,6 @@ public class StepHandlerStep extends AbstractStep {
}
try {
itemHandler.mark();
transactionManager.commit(transaction);
}
catch (Exception e) {
@@ -347,7 +345,6 @@ public class StepHandlerStep extends AbstractStep {
stepExecution.rollback();
try {
itemHandler.reset();
transactionManager.rollback(transaction);
}
catch (Exception e) {