Spring Batch exception records inserting in database

Hi,
I am currently working on project wherein I am reading, validating and then inserting records in database. Now,

  1. While validating, if some erroneous record comes up, I have to update its status in db and continue processing next record.
  2. If validation for a record is successful, again its status has to be updated in db.

Please suggest a way out for the same.

Thanks in anticipation :)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.