This is a general question for 2 tiered (app server and DB). I am getting started with Hibernate and was using ThreadLocal to hold the session and disconnecting it with a ServletFilter. That doest work well bc if I get an object in one request with one thread, and then try to get the dependent objects (lazy loaded) in a subsequent request with another thread, hibernate complains.
I guess one solution is to go to a hibernate session per HttpSession with a session disconnect filter. Are there any other solutions or any references to other solutions. Any thoughts are appreciated.
_________________ -alan
|