aspose file tools*
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 EJB 3 in Action this week in the EJB and other Java EE Technologies 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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: DAO batch processing
 
Similar Threads
EJB Transactions
Maximum number of messages sent to a Queue in OpenMQ ?
addBatch - help/ideas?
When commit transaction
reading and writing large data(200000) from oracle