[hibernate-dev] Memory consumption

Markus Heiden markus at markusheiden.de
Mon Nov 12 16:40:13 EST 2007


Hi Shawn,

I experienced some time ago, that turning off the 2nd level could help 
getting rid of memory consumption problems, but wasn't able to track down 
the problem exactly. Your problem is the same problem as mine. As a solution 
I suggested to cut the references to the instances (application objects) in 
all Entity*Actions to be able to garbage collect the instances when they are 
no more needed by the application. The Entity*Actions would still be in 
ActionQueue.executions but this memory consumption should be acceptable.

As a workaround turning off the query cache works for this problem too (at 
least if the Entity*Actions have hasAfterTransactionCompletion() == false), 
because the Entity*Actions aren't cached at all in ActionQueue.executions 
(as you already described).

Markus Heiden





More information about the hibernate-dev mailing list