IN PROGRESS - issue BATCH-569: Add RetryOperationsInterceptor with stateful retry

Add context to retry recovery callback
This commit is contained in:
dsyer
2008-05-11 14:04:03 +00:00
parent 4ed7cc5a25
commit eabac61a40
8 changed files with 15 additions and 20 deletions

View File

@@ -215,9 +215,9 @@ public class StatefulRetryStepFactoryBean extends SkipLimitStepFactoryBean {
}
}, itemKeyGenerator != null ? itemKeyGenerator.getKey(item) : item);
retryCallback.setRecoveryCallback(new RecoveryCallback() {
public Object recover(Throwable throwable) {
public Object recover(RetryContext context) {
if (itemRecoverer != null) {
return itemRecoverer.recover(item, throwable);
return itemRecoverer.recover(item, context.getLastThrowable());
}
return null;
}