We've just recently started using Hibernate and are still getting used to the way it works.
On of the things we've seen is that even after all sessions are closed and references have gone out of scope, hibernate still seems to maintain the previously used database values in it's cache.
We have code that reads from a set of tables in multiple passes. Because all the memory is freed very sparingly, the later passes slow down to a crawl.
Is there any way to force Hibernate to clear its cache ?
An explicit call to System.gc() doesn't help. (Yes, I know it is a suggestion)
Additional Info: We've explicitly disabled the second-level cache.