]
Gail Badner closed HHH-2200.
----------------------------
Assignee: Gail Badner
Resolution: Fixed
Fix Version/s: 3.3
3.2.6
This issue was fixed by the fix for HHH-2627.
Memory leak in AbstractBatcher with Generated Properties
--------------------------------------------------------
Key: HHH-2200
URL:
http://opensource.atlassian.com/projects/hibernate/browse/HHH-2200
Project: Hibernate3
Issue Type: Bug
Affects Versions: 3.2.0.ga
Environment: Hibernate 3.2.0 GA; Oracle 10g; Java 1.5
Reporter: Jay Paulsen
Assignee: Gail Badner
Fix For: 3.2.6, 3.3
Using Hibernate 3.2 GA with Entity Manager and Annotations, I have a batch job that
inserts several thousands of objects for a class with a @Generated property. The job
results in a memory leak in the AbstractBatcher class.
The problem appears to be in the method processGeneratedProperties in
AbstractEntityPersister. This method closes the result set for the generated property
query and calls session.getBatcher().closeStatement() to close the statement instead of
session.getBatcher().closeQueryStatement to close both the statement and the result set.
The result is that even though the result set is closed, it is not removed
AbstractBatcher's resultSetsToClose HashSet.
Even though the batch job commits and clears the session every 200 rows, over time the
leaked result sets in resultSetsToClose results in an OutOfMemory problem.
I've changed the code in AbstractEntityPersister.processGeneratedProperties to call
session.getBatcher().closeQueryStatement and the same job then runs to completion without
the memory leakage.
I noticed that this method in AbstractEntityPersister has had a recent change to fix a
similar problem for issue HHH-1750, so I wanted to verify that this fix is the right
approach.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: