I'm a Spring newbie and I want to do the following:-
1. Poll a directory for files
2. For each file read, launch a batch job to read and validate the contents of each file.
I already have the code to do the validation, it currently uses an old Spring
SimpleFlatFileInputSource but needs to be changed to use a FlatFileItemReader.
The following link setups a poller
http://static.springsource.org/sprin...nce.html#files
The following link tells me I need to setup a FileToJobLaunchRequestAdapter to launch the batch job.
http://blog.springsource.com/2010/02...g-integration/
The question is then how to I setup/configure a FileToJobLaunchRequestAdapter?
The following are the inbound channel adapter config in the first example so how does this need to be changed to call the FileToJobLaunchRequestAdapter?
<file:inbound-channel-adapter id="filesIn"
directory="file:${input.directory}"/>
<file:inbound-channel-adapter id="filesIn"
directory="file:${input.directory}"
filter="customFilterBean" />
<file:inbound-channel-adapter id="filesIn"
directory="file:${input.directory}"
filename-pattern="^test.*$" />
I'm willing to read any articles or recommended books!.


Reply With Quote