If you are calling flush() you should see the SQL being written to the
database, however the transaction will only be committed, and the memory
will only be released when you call commit.
You could either split your transaction up into several different
transactions. Either using multiple SessionBean calls, or using a Bean
Managed Transaction.
You could also call flush() and then clear() to release the memory after the
flush. Note that this will detach and previously read objects, and new
changes must be made on newly read objects or merged.
jaxenlt 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
>
> --
> Jackson Thompson
>
-----
---
http://wiki.eclipse.org/User:James.sutherland.oracle.com James Sutherland
http://www.oracle.com/technology/products/ias/toplink/ Oracle TopLink ,
http://www.eclipse.org/eclipselink/
EclipseLink , https://glassfish.dev.java.net/javaee5/persistence/ TopLink
Essentials
Wiki: http://en.wikibooks.org/wiki/Java_Persistence Java Persistence ,
http://wiki.eclipse.org/EclipseLink EclipseLink
Forums: http://forums.oracle.com/forums/forum.jspa?forumID=48 TopLink ,
http://www.nabble.com/EclipseLink-f26430.html EclipseLink ,
http://www.nabble.com/java.net---glassfish-persistence-f13455.html Glassfish
Persistence
--
View this message in context: http://www.nabble.com/Force-Commits-tf4925963.html#a14131490
Sent from the java.net - glassfish persistence mailing list archive at Nabble.com.