-
Jan 11th, 2013, 07:53 AM
#1
resource file name access in processor after read by multiresourcereader
Hi,
any smart suggestions how to access the name of a file inside a processor when the file was read by a MultipleResourceReader configured with wild card pattern before?
In the processor, I want to access filename A when item A was read from file A and filename B when item B was read from file B.
Thanks,
Elmar
-
Jan 11th, 2013, 10:50 AM
#2
I guess injecting MultiResourceItemReader into the processor and then callling its getCurrentResource method is the right approach. I will try and let you know...
-
Jan 11th, 2013, 03:23 PM
#3
That is a bad way to do this. If you are willing to use the current nightly build, we have added a ResourceAware interface. By implementing this interface on your item, the MultiResourceItemReader will inject the resource the item came from into the item for future reference. You can read more about it here: https://jira.springsource.org/browse/BATCH-1854
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules