Retrieving Large Lists of Objects Using Java EE

Posted by hallidave on Stack Overflow See other posts from Stack Overflow or by hallidave
Published on 2011-01-05T20:22:14Z Indexed on 2011/01/05 20:54 UTC
Read the original article Hit count: 153

Filed under:
|
|

Is there a generally-accepted way to return a large list of objects using Java EE?

For example, if you had a database ResultSet that had millions of objects how would you return those objects to a (remote) client application?

Another example -- that is closer to what I'm actually doing -- would be to aggregate data from hundreds of sources, normalize it, and incrementally transfer it to a client system as a single "list".

Since all the data cannot fit in memory, I was thinking that a combination of a stateful SessionBean and some sort of custom Iterator that called back to the server would do the trick.

How have you successfully solved this problem in the past?

© Stack Overflow or respective owner

Related posts about java

Related posts about java-ee