This week's book giveaway is in the Big Data forum.
We're giving away four copies of Elasticsearch in Action and have Radu Gheorghe & Matthew Lee Hinman on-line!
See this thread for details.
The moose likes EJB and other Java EE Technologies and the fly likes DAO batch processing Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Elasticsearch in Action this week in the Big Data forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "DAO batch processing" Watch "DAO batch processing" New topic

DAO batch processing

Rashika Khanna

Joined: Aug 25, 2004
Posts: 13
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,
Rahul kapoor

Joined: Sep 21, 2004
Posts: 16
You can try using batch updates. It is one of the features provided with the JDBC 2.0 API

You can get more detailshere
Don't get me started about those stupid light bulbs.
subject: DAO batch processing