• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

DAO batch processing

 
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
The harder you work, the luckier you get. This tiny ad brings luck - just not good luck or bad luck.
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic