users@glassfish.java.net

Forcing commit and em.flush does not seem to do it

From: <glassfish_at_javadesktop.org>
Date: Tue, 04 Mar 2008 10:41:44 PST

I am running out of memory and cpu doing mass updates on my application. At this point it is only happening on my dev machine, but the application will be adding more data so I fear I will see it in staging or production in the future if I don't handle it now. I am using Netbeans 6.0, glassfish v2, toplink, and postgres.

The basic question is how do I force a stateless session bean to commit? I have placed em.flush statements at points where I would like to have it commit all the statements that have been run up to that point, but it does not seem to do it. I have debug loggin on for JPA and I can see the queries going to the DB, nothing happens when em.flush() is called.
[Message sent by forum member 'jaxent' (jaxent)]

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