(In short i want to delete a file after job has completed and reader has finished with it)
I have successfully created a reader of our custom file type
I have got a directory poller that looks at the directory for files to process
I pickup the files
I pass to the item reader the resource for a given file read it process it etc
The job ends we look again setting resource to next file and reuse job with new parameters
once all files have been dealt with i wish to delete the process files then poll directory again to see if any more have turned up.
Better still once single job for processing one file has finished delete the single file then continue to next file.
Even though the job finishes executing and has completed status and has read to the end of file the reader still seems to have a buffer open to the file and will not allow for its deletion meaning that I’m processing the same files over and over again!
Is there a way to de-reference the file? The job has finished and it has read through complete file i don’t know why it is still referencing it.
Cheers for help!


Reply With Quote
