Java Mailing List Archive

http://www.gg3721.com/

Home » users.openjpa »

Caching large result set problem (Glassfish memory usage grow)

jeank

2008-07-30


Author LoginPost Reply

(OpenJPA 1.1, Glassfish, mysql)
Hi, my problem is:

I have a stateful bean with "openjpa.ConnectionRetainMode" - "always" for
handle large relult sets, and with fetch configuration:

    Query q = em.createQuery("select m from Account m ");
         
    kq = OpenJPAPersistence.cast(q);
    JDBCFetchPlan fetch = (JDBCFetchPlan) kq.getFetchPlan();
   
    fetch.setQueryResultCacheEnabled(false);
    fetch.setFetchBatchSize(pageS);
    fetch.setResultSetType(ResultSetType.SCROLL_INSENSITIVE);
    fetch.setFetchDirection(FetchDirection.FORWARD);
    fetch.setLRSSizeAlgorithm(LRSSizeAlgorithm.LAST);
       
    s = kq.getResultList();

It works fine, but in task manager (Windows) grow a memory usage of
Glassfish when i scroll result set. Seems like Glassfish or OpenJPA cache
requested data. After application is closed, memory size freeze and not
decrease.
How to localize a problem?
--
Sent from the OpenJPA Users mailing list archive at Nabble.com.

©2008 gg3721.com - Jax Systems, LLC, U.S.A.