contec wrote:
A bit of a hibernate newbie here, so bear with me if I'm missing something completely obvious - I'm using the ThreadLocal pattern suggested in the documentation in a Hibernate/Struts app.
I'm trying to implement a fast paging strategy for large datasets. This means that I'm unsure about the usefulness of closing the session after each Struts Action finishes executing - however regardless of that, I'm having trouble with my associated, lazy-loaded objects.
It seems that if I manually close the session right before returning from my Struts Action class, I get exceptions from the lazy loaded classes that I'm trying to show on my JSP page.
But if I don't close the session, I eventually get memory space errors.
Is there a simple way to deal with this issue?
http://www.hibernate.org/43.html