• Post Reply Bookmark Topic Watch Topic
  • New Topic

Hibernate getCurrentSession() is necessary to close?

 
stshiva raaj
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I used a single session per thread request. I have transaction open and commit. Correct me If I wrong "getCurrentSession and openSession need to close the session by us" right?. For both I used code to explicitly close the session using HibernateSessionFactory.closeSession(). Does Hibernate close the session automatically?
 
Happiness is not a goal ... it's a by-product of a life well lived - Eleanor Roosevelt. Tiny ad:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!