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 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 Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "DAO batch processing" Watch "DAO batch processing" New topic
Author

DAO batch processing

Rashika Khanna
Greenhorn

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,
Rashmi
Rahul kapoor
Greenhorn

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
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: DAO batch processing
 
Similar Threads
When commit transaction
EJB Transactions
addBatch - help/ideas?
Maximum number of messages sent to a Queue in OpenMQ ?
reading and writing large data(200000) from oracle