Marc Siegel wrote: > > By doing self-contained data access in transactions, and by completely > discarding and recreating the EntityManager every so often as well as > the EntityManagerFactory, I seem to have held memory usage down pretty > well. I don't know if that strategy would work in your case but I > would keep it in mind, apparently the J2EE application servers do > this? >
I would definitely think that creating entitymanager every so often would be beneficial for memory and performance usage, since I am seeing some strange results when transactions with large data volumes are involved. However, our current architecture is based on a single entitymanager (persistencemanager) being open during the entire session of a user (it's a rich client application, not a web application). Anyway, the design of the entitymanager should be such that this should not be the case, so may be it needs a little more investigation. Christiaan -- View this message in context: http://www.nabble.com/EntityManager-memory-usage-tf4752283.html#a13631741 Sent from the OpenJPA Users mailing list archive at Nabble.com.
