BATCH-2500: MultiResourceItemWriter with StaxEventItemWriter restarts at position 0
MultiResourceItemWriter delegating to a StaxEventItemWriter doesn't restart properly. * Changed the open() method in MultiResourceItemWriter by setting the flag 'opened' to true. Updated PR with code review comments.
This commit is contained in:
committed by
Glenn Renfro
parent
ff923e0b8f
commit
e2147e2495
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2006-2007 the original author or authors.
|
||||
* Copyright 2006-2017 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -151,6 +151,7 @@ public class MultiResourceItemWriter<T> extends AbstractItemStreamItemWriter<T>
|
||||
if (executionContext.containsKey(getExecutionContextKey(CURRENT_RESOURCE_ITEM_COUNT))) {
|
||||
// It's a restart
|
||||
delegate.open(executionContext);
|
||||
opened = true;
|
||||
}
|
||||
else {
|
||||
opened = false;
|
||||
|
||||
Reference in New Issue
Block a user