Hello,
we are facing a what seems to be file lock issue:
We have defined a Tasklet where we create a new file by copying another one from a remote location(apologies for the hypothetical tags but you get the point..):
and then a final Tasklet which attempts to delete that file:Code:<step1> <tasklet> public RepeatStatus execute(StepContribution stepContribution, ChunkContext chunkContext){ ................ FileUtils.copyFileToDirectory(remoteZipFile, zipFileLocalCopyDirectory, true); ................ } </tasklet> </step1>
that call fails because Tasklet from step1 seems to still be holding a lock on that file..Code:<step2> <tasklet> ................. FileUtils.cleanDirectory(zipFileLocalCopyDirectoryProvider.getDirectory()); ................. </tasklet2> <step2>
Any ideas/input on why this is happening and how we can solve the problem much appreciated. We are using the commons FileUtils is that plays any role.
Regards,
Savvas


):
Reply With Quote