users@glassfish.java.net

Re: EntityManager not clearing data from memory

From: <glassfish_at_javadesktop.org>
Date: Wed, 12 Dec 2007 09:28:05 PST

The problem did occur at page 45, it also occured at page 46, I tried 48 as well and that died. Then I went back and it made it to 40 but then when I called next to get to page 41 it died again.

I'm using PostgreSQL 8.2 for the backend.

I guess the next question is when I make these calls...

Query selectQuery = entityManager.createNativeQuery(sqlStmtBuilder.getStatement());

selectQuery.setFirstResult(currentPage * DEFAULT_PAGE_SIZE);
selectQuery.setMaxResults(DEFAULT_PAGE_SIZE);

System.err.println("1");

List<Vector<Object>> resultList = (List<Vector<Object>>) selectQuery.getResultList();

System.err.println("2");

I see the 1 print out but not the 2 - the memory error seems to be occuring while getting the ResultList.

The way we thought it worked was that it only pulled in the 2k page size, but does seems to pull everything?

As I am walking from page 1-45 for the standard death is starts of quickly and then gets progressively slower.
[Message sent by forum member 'brianpeck' (brianpeck)]

http://forums.java.net/jive/thread.jspa?messageID=249756