Read the rules before posting!
http://www.hibernate.org/ForumMailingli ... AskForHelp
Hibernate version:
2.1.7
Please help me with this issue :)
I am getting an out of memory exception when I retrieve a large collection of objects. I have read the following post:
http://blog.hibernate.org/cgi-bin/blosx ... batch.html
and several others trying to figure out what I am doing wrong but its not at all clear to me.
I ran a memory profiler and all of the "lost" memory gets stuck in a hibernate FastHashMap.
I call Query.setFetchSize().
Every 20 or so objects I call session.flush() and session.clear().
I am executing a native SQL so I am no using the query.scroll() method.
However, it seems I should be able to iterate through a collection of any size by initially setting fetch size and then clearing the session cache.
I can probably put together a small block of code to demonstrate this if necessary, but I just was wondering if anyone had any ideas?
Thanks!