milestoliver wrote:
Unfortunately, if you close your Session and then try to access part of the object graph (i.e. data from a child table) that has not been lazily loaded, you will get an exception thrown your way from Hibernate (since you no longer have a session). Lazy-loading assumes that you have a session open.
I do not understand why you need more than one session/connection per thread. IMO, you're exactly using the OpenSessionInView pattern.
Obviously, for each object provided by any method of yours, if you want to enable lazy-loading, it will keep one connection. So, if you've got 1000 library calls, you'll need having 1000 connections open. Do I understand well ?