[ajug-members] JPA/Hibernate OutOfMemoryException

J. Talafous jtalafous at gmail.com
Mon Oct 23 11:17:36 EDT 2006


I'm writing a thick client (pharmaceutical/scientific) using JPA with
Hibernate as the provider and have been quite successful using this
article as a guide:

http://today.java.net/pub/a/today/2006/06/08/more-ejb3-persistence-api-for-client-side-developer.html

Unfortunately, when I scale up, I am finding that Hibernate is running
out of heap space when I EntityManager.persist() the entire object
graph that I have built in my thick client, even with -Xmx1500m, etc.
All works quite well in smaller object graphs.

Since the whole reason I am using JPA is to avoid dealing with a
database, I can bet that I am not using JPA/Hibernate efficiently.
For example, I am cascading everything, and wonder if that is causing
it.  Any links, ideas, etc. in getting better memory usage would be
greatly appreciated.  Thanks in advance.



More information about the ajug-members mailing list