users@glassfish.java.net

Re: EntityManager not clearing data from memory

From: Witold Szczerba <pljosh.mail_at_gmail.com>
Date: Wed, 12 Dec 2007 16:20:57 +0100

Do you think this can have anything to do with the issue I've entered
few weeks ago?
https://glassfish.dev.java.net/issues/show_bug.cgi?id=3596
It is resolved already, but it was after v2 final.

Witold Szczerba



2007/12/11, glassfish_at_javadesktop.org <glassfish_at_javadesktop.org>:
> Hey all,
>
> I've set up a chunking request for my JPA objects but it seems to not be clearing the old chunks and I am running out of heap space.
>
> The way it works is I request a page size of 2k using
>
> selectQuery.setFirstResult(currentPage * DEFAULT_PAGE_SIZE);
> selectQuery.setMaxResults(DEFAULT_PAGE_SIZE);
>
> with the current page being the chunk we want, and the page size being 2k
>
> But around page 45 I run out of heap memory in my java VM.
>
> and i'm doing the normal clear functions
>
> selectQuery = null;
> this.entityManager.clear();
> this.entityManager.close();
> this.entityManager = null;
> this.entityManager = Persistence.createEntityManagerFactory("ASDFS").createEntityManager();
>
> Anyone know any other way to clear the EntityManager's data?
> [Message sent by forum member 'brianpeck' (brianpeck)]
>
> http://forums.java.net/jive/thread.jspa?messageID=249612
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>
>