This forum is now a read-only archive. All commenting, posting, registration services have been turned off. Those needing community support and/or wanting to ask questions should refer to the Tag/Forum map, and to http://spring.io/questions for a curated list of stackoverflow tags that Pivotal engineers, and the community, monitor.

Is Spring Batch right for me?

I am evaluating the possibility of using spring batch in a project where I work bu t I don't know if it'a right for the job. I'll try to describe the scenario...

We have a table thats going to store records from a web based application, and the processing would occur a few times a day while the app is running.

Now the problem is that we need to create about 4 files 2 times a day, we need to create 1 for each record type stored in the table, each file created should have a unique name. We would have to query the db for all the records of a specific record type and output all the records to a flatfile, the FIRST line of the file is a summary line with the record count,total sum of money and record type. Each record should be processed only once so I guess each record has to be updated so It will be excluded from future processing.

I've been having hard time figuring out if spring batch can help here so any help will be appreciated.

The scenario you describe sounds like a good fit to me, and I have worked with clients that have needed to solve a similar problem before. The only piece Spring Batch doesn't give you is the scheduler to launch the job 4 times a day, although in a simple scenario such as this you could easily use Quartz. There's an example of how to do this in the samples.