rje0929 wrote:
Now I can solve this problem by increasing the heap size. But I've noticed that when the buildSessionFactory() is called, it is initializing a copy of all my objects that are being persisted and I believe this is what is causing the problem. When I switched back to my XML mapping structure, those objects were not being initialized by buildSessionFactory().
So I basically have 2 questions. Is there a way I can stop buildSessionFactory() from initializing copies of all my (persistable) objects? And is an increased memory usage the price of using annotations?
can you be a bit more specific? There should be no fundamental diff between annotations and xml.