BATCH-1780: Updated usage of StepLIstenerFailedException to match doc

This commit is contained in:
Michael Minella
2012-10-12 15:22:00 -05:00
parent 5085dc9e61
commit 2fea09b9ce
2 changed files with 11 additions and 11 deletions

View File

@@ -30,7 +30,7 @@ import org.springframework.batch.item.ItemStream;
/**
* @author Dave Syer
*
*
*/
public class MulticasterBatchListener<T, S> implements StepExecutionListener, ChunkListener, ItemReadListener<T>,
ItemProcessListener<T, S>, ItemWriteListener<S>, SkipListener<T, S> {
@@ -57,7 +57,7 @@ public class MulticasterBatchListener<T, S> implements StepExecutionListener, Ch
/**
* Register each of the objects as listeners. Once registered, calls to the
* {@link MulticasterBatchListener} broadcast to the individual listeners.
*
*
* @param listeners listener objects of types known to the multicaster.
*/
public void setListeners(List<? extends StepListener> listeners) {
@@ -169,7 +169,7 @@ public class MulticasterBatchListener<T, S> implements StepExecutionListener, Ch
}
/**
*
*
* @see org.springframework.batch.core.listener.CompositeChunkListener#afterChunk()
*/
public void afterChunk() {
@@ -182,7 +182,7 @@ public class MulticasterBatchListener<T, S> implements StepExecutionListener, Ch
}
/**
*
*
* @see org.springframework.batch.core.listener.CompositeChunkListener#beforeChunk()
*/
public void beforeChunk() {
@@ -208,7 +208,7 @@ public class MulticasterBatchListener<T, S> implements StepExecutionListener, Ch
}
/**
*
*
* @see org.springframework.batch.core.listener.CompositeItemReadListener#beforeRead()
*/
public void beforeRead() {
@@ -229,12 +229,12 @@ public class MulticasterBatchListener<T, S> implements StepExecutionListener, Ch
itemReadListener.onReadError(ex);
}
catch (RuntimeException e) {
throw new StepListenerFailedException("Error in onReadError.", ex, e);
throw new StepListenerFailedException("Error in onReadError.", e, ex);
}
}
/**
*
*
* @see ItemWriteListener#afterWrite(List)
*/
public void afterWrite(List<? extends S> items) {
@@ -269,7 +269,7 @@ public class MulticasterBatchListener<T, S> implements StepExecutionListener, Ch
itemWriteListener.onWriteError(ex, items);
}
catch (RuntimeException e) {
throw new StepListenerFailedException("Error in onWriteError.", ex, e);
throw new StepListenerFailedException("Error in onWriteError.", e, ex);
}
}

View File

@@ -18,7 +18,7 @@ package org.springframework.batch.core.listener;
/**
* Exception to indicate a problem in a step listener.
*
*
* @author Dave Syer
*
*/
@@ -37,8 +37,8 @@ public class StepListenerFailedException extends RuntimeException {
* @param ex the exception that was thrown by a listener
* @param e the exception that caused the skip
*/
public StepListenerFailedException(String message, Throwable ex, RuntimeException e) {
super(message + "\n" + e.getClass().getName() + ": " + e.getMessage(), ex);
public StepListenerFailedException(String message, RuntimeException ex, Throwable e) {
super(message + "\n" + e.getMessage() + ": " + e.getClass().getName(), ex);
}
}