View Full Version : Run BatchJob for the entire resultset
Feb 1st, 2008, 03:46 PM
I have a batchjob that takes the input from the database and the output to send an email with the rows from the database.
The issue that I am getting is for each row it's sending an email.I want the email for the entire resultset not for me.
Please let me know how can I achieve that.
Feb 2nd, 2008, 03:36 AM
If your result set isn't too large (probably isn't if you are sending it in an e-mail), you can just write a Tasklet that uses JdbcTemplate directly to process the query and then sne an e-mail at the end.
Feb 4th, 2008, 01:22 PM
I am hereby attaching my xml document.
The issue that I am getting is it's sending an email for each and every row instead of sending the email for the entire list.
It would be appreciated if I get the response as early as possible.
Feb 4th, 2008, 01:37 PM
That's what would happen if your Tasklet only processes one row per call to execute(), or if it doesn't return ExitStatus.FINISHED when it is done. So we may need to see the Tasklet not the XML.
Powered by vBulletin® Version 4.2.1 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.