Accessing the currently processing filename
I'm using a MultiResourceItemReader to load files into a FlatFileItemReader which are then run through a ItemProcessor before being written out to FlatFileItemWriter.
The ItemProcessor is updating a database. What I want to do for operational purposes it write a separate record to the database to log each file that is processed.
I've tried using a ChunkListener and a StepExecutionListener, but don't seem to be able to find a handle to get the current resource.
I've also injected the MultiResourceItemReader itself into a ChunkListener, but the getCurrentResource.getFilename() seems to always null..
Any suggestions on the best way to do this?
"We should move forwards, not backwards, upwards, not sideways, and always twirling, twirling towards victory!"