Currently our code uses batchUpdate method of JdbcTemplate to do batch Insertion.
My question is in case of any exception in one of the update how to handle it (suppose just by adding the log) and continue with the next update sql statements?
Also how batchUpdate() method fo JdbcTemplate handles the exceptions?
Snippet here.
/**
* Saves the list of <code>Item</code> objects to the database in a batch mode
*
* @param objects
* list of objects to save in a batch mode
*/
public void save(final List<Item> listOfItems) {
for (List<Debit> list : listOfItems) {
getJdbcTemplate().batchUpdate(insertItem, new ItemBatchPreparedStatementSetter(list));
}
}