IntelliJ Java IDE
The moose likes Other Application Frameworks and the fly likes Hibernate Session Control in Spring Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Application Frameworks » Other Application Frameworks
Reply Bookmark "Hibernate Session Control in Spring" Watch "Hibernate Session Control in Spring" New topic
Author

Hibernate Session Control in Spring

Avinash Rawana
Ranch Hand

Joined: Feb 22, 2006
Posts: 31
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


--------------<br />Avinash A. Ramana<br />NYIT Student<br /><a href="http://www.aramana.org" target="_blank" rel="nofollow">http://www.aramana.org</a><br />avinash@styleempire.com
Chris Mathews
Ranch Hand

Joined: Jul 18, 2001
Posts: 2712
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.
 
 
subject: Hibernate Session Control in Spring
 
Threads others viewed
Tomcat and Database Sessions
Sessions in Hibernate
Disappointed w/ Hibernate
Jboss connection pooling timeout
Hibernate Session closure
MyEclipse, The Clear Choice