[jboss-user] [EJB 3.0] - ScrollableResults possible in JBoss ?

marcelvanvelzen do-not-reply at jboss.com
Tue Apr 10 16:20:18 EDT 2007


Hi there,

I am retrieving information from a Postgres database via the EntityManager, createQuery and its function getResultList(). It is easy to use especially with the EJB entity annotations. A disadvantage is that it stores all the results in memory. I know about the pagination possibilities with setFirstResult() and setMaxResults().

I want to access data like a cursor and only having one record at a time in memory (not totaly true, since the dbms will store some additional records in memory, but ok). It is meant for a server side process triggered by a timer, so pagination using the getResultList() makes no sence.

Has anybody some experience with ScrollableResults and the scroll() and evict() functions in JBoss ? And if possible share some code how to do this in JBoss.

I have spent several days now on this topic, but I have no idea how to proceed.

Thanks in advance,

Marcel


View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4036118#4036118

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4036118



More information about the jboss-user mailing list