I try to archive a processed file in the "After Step" methode, but doesn't work, i think this file is locked by the batch while executing the batch.
Is there any way to release this file from batch resources so i can move it?
Thanks.
I try to archive a processed file in the "After Step" methode, but doesn't work, i think this file is locked by the batch while executing the batch.
Is there any way to release this file from batch resources so i can move it?
Thanks.
Moving a file really isn't a good idea in an AfterStep method. Generally, I try to avoid doing anything complex in listener methods. You should have a separate step that takes care of it. The biggest advantage there is that if the move fails, then you can restart directly on that step and just try the move again.
You don't need a reader to move a file. You should use a Tasklet to do it. See this for inspiration: http://static.springsource.org/sprin...p.html#d0e3266