Is there a common way to return a large list of objects using Java EE?
For example, if you had a ResultSet database with millions of objects, how would you return these objects to a (remote) client application?
Another example - this is closer to what I'm actually doing - is to collect data from hundreds of sources, normalize them and gradually transfer them to the client system as one "list".
Since all data cannot fit in memory, I thought that combining the SessionBean state with the state and some kind of custom Iterator that accessed the server would do the trick.
So, in other words, if I have an API, for example Iterator<Data> getData(), then what is a good way to implement getData()and Iterator<Data>?
How did you successfully solve this problem in the past?
source
share