• 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

Huge data, problem iterating resultset

 
Ranch Hand
Posts: 50
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
deaar all,

for the reporting purpose, i retrieve a huge data from oracle db using JDBC, invoke a procedure and get a cursor. as i iterate the cursor with ResultSet, i call one more procedure to get the details of this result(unique id). all are put into the appropriate beans and stored into the arraylist. by this time, I get transaction roll back exception if the data is huge, for example if the data exceeds 1000.

the structure is like this

call proc_1(param)
rs1 = get from proc_1 //this is the one that has thousands of records

iterate(rs1) {
id = rs1(1);
//map to beans

call proc_2(id)
rs2 = proc_2 // comes in tens
iterate(rs2) {
//map to beans
}

call proc_3(id)
rs3 = proc_3 // count mostly below 5
iterate(rs3) {
//map to beans
}
//add bean to arraylist
}

//get the complete list

the above pseudo code of the total iteration. now i tried changing the procedure to retrieve all the results using inner cursors in single call to the db. i iterate the inner cursors the same way, except that i wont call the procedures (proc_2 and proc_3) explicitly. but anyway the problem was not solved.


Thanks in advance for your helps

Vijay
 
Bartender
Posts: 10336
Hibernate Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What does the exception say?
 
Bartender
Posts: 6663
5
MyEclipse IDE Firefox Browser Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

transaction roll back exception



Post the full stack trace. Is it a timeout ?

for the reporting purpose



What sort of reporting requirement requires you to store the entire data into an arraylist ? Can your requirement not be satisfied by BIRT / Crystal reports etc etc ?
reply
    Bookmark Topic Watch Topic
  • New Topic