This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Spring and the fly likes spring batchupdate Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Frameworks » Spring
Bookmark "spring batchupdate" Watch "spring batchupdate" New topic
Author

spring batchupdate

mark I thomas
Ranch Hand

Joined: Apr 07, 2008
Posts: 86
When Spring does batchupdate on a List of records, if we set batch size = 10, if the 5th records fails in the DAO operation does Spring stop there and roll back the first 4 records ? or does it continue the next 5 records ?

Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17249
    
    6

mark I thomas wrote:When Spring does batchupdate on a List of records, if we set batch size = 10, if the 5th records fails in the DAO operation does Spring stop there and roll back the first 4 records ? or does it continue the next 5 records ?



Using Spring Batch module, when you configure your jobs, you have the ability to configure what happens. If you want it to continue, you can tell it to continue in your configuration, if you want it to stop when you hit an error it can stop if you tell it to in your configuration.

If you aren't using Spring Batch and your question is via Spring JdbcTemplate, then I am not sure.

Mark


Perfect World Programming, LLC - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: spring batchupdate
 
Similar Threads
batchUpdate problem
Batch Update question
SQLexception-duplicate records
Need clarification on URLyBird 1.3.1 requirement
Alfresco Enterprise Content Management Implementation