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
_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to