[jboss-user] [EJB 3.0] - traversing through result
gerch
do-not-reply at jboss.com
Tue Jan 29 12:04:46 EST 2008
Hi
i have been looking for quite some while now for a solution to this problem.
I have a table in my oracle database which has 2.000.000 (yes 2 million rows) and i need to process them one after the other
we are using ejb 3.0 and if just try
public List<Person> getList()
| {
| Query q = em.createQuery("from Person");
|
| return q.getResultList();
| }
i get an out of memory error after 5 min of trying to load all the people :)
how can i traverse through the result set
something like:
| public void process(){
| // does not acutally work (JUST AN EXAMPLE)
| ResultSet s = em.createQuery("from Person");
|
| while (s.hasNext()){
| // so something
| }
| }
|
Thank you very much
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4124490#4124490
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4124490
More information about the jboss-user
mailing list