Win a copy of OCP Oracle Certified Professional Java SE 11 Programmer I Study Guide: Exam 1Z0-815 this week in the Programmer Certification forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Junilu Lacar
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Knute Snortum
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Ron McLeod
  • Carey Brown
Bartenders:
  • Paweł Baczyński
  • Piet Souris
  • Vijitha Kumara

Hibernate Session Control in Spring

 
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm new to Spring and sort of with Hibernate. I'm migrating from using Hibernate standalone to integration with Spring and was told it was going to be able to close sessions with minimal configuration.

I'm not sure where to close the session and how I should configure it to close the sessions.

As we speak I have a DAO that extends HibernateDaoSupport. By printing Stats of the Session Factory it shows that no sessions are closed.

What am I missing here?

-Avinash Rawana
 
Ranch Hand
Posts: 2713
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What are you using from Spring? HibernateDaoSupport or HibernateTemplate directly? Please include a snippet of your Spring config for the Hibernate related components. Also I would recommend reading Spring Data Access using O/R Mappers if you haven't already.
 
"How many licks ..." - I think all of this dog's research starts with these words. Tasty tiny ad:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!