Hello,
em.flush() just causes the persistence provider to send out changes
from the Persistence Context. It does not affect the state of the
transaction. You may want to try em.clear() after the flush call to
remove the currently managed entities from the Persistence Context.
--Gordon
Jackson Thompson wrote:
> I need to sync my database to some web services on a regular basis. I
> am using stateless session beans to do so. I don't need every thing
> to be in a single transaction and and doing so is sucking up all my
> memory and CPU. I tried to put em.flush() calls in when done with
> particular objects, but they do not seem to be forcing the commits. I
> am missing something? I am using:
> glassfish v2-b58g
> TopLink, version: Oracle TopLink Essentials - 2.0 (Build b58g-fcs
> (09/07/2007))
> postgresql-8.1-407.jdbc3.jar