This week's book giveaway is in the Design forum.
We're giving away four copies of Design for the Mind and have Victor S. Yocco on-line!
See this thread for details.
Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

DAO batch processing

 
Rashika Khanna
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello everybody,

I have a batch process that runs once in a day. It puts data from tran table to a core table. I have used a BMP which considers each recored of tran table as one transaction so that if one record is not processed it is rolled back and batch can continue with further records.
For updating the records I am using DAO, but the problem is that my code is using each record as a separate process and a separate transaction. This means I need to call the DAO equal to the num of records need to update. So how it is going to help in improving the performance as through DAO also I m updating one record at a time.
Is there a way through which I can update all the rows at once with rollbacking those rows which had exception in updating.

Please help me out.
Thanks in advance,
Rashmi
 
Rahul kapoor
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can try using batch updates. It is one of the features provided with the JDBC 2.0 API

You can get more detailshere
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic