Hi,
Thanks for the response. Each request in our application spans many DAO's to do specific task. Yes, I do really close the session at the end of each DAO and also get new session at the begining of new DAO. What are the consequences if I dont use the ThreadLocal objest. How about if I just get the session and close it at the end of each DAO. I'm refactoring the code that is already in production and changing too much is too much for me as I dont want to break whole lot.
All my intention is to build the session factoy once during the server start up and get sessions from it. When u say counter decrease, do u mean something that is similar to this
http://www.hibernate.org/42.html.
Thanks a bunch