Results 1 to 2 of 2

Thread: "unclose connection" when use getHibernateTemplate

  1. #1
    Join Date
    Oct 2004
    Posts
    5

    Default "unclose connection" when use getHibernateTemplate

    in spring i usegetHibernateTemplate() to get list,but i can see from control pannel:
    debug:net.sf.hibernate.impl.SessionImpl <running Session.finalize()>
    warning:net.sf.hibernate.impl.SessionImpl <unclose connection>
    debug:net.sf.hibernate.impl.SessionImpl <running Session.finalize()>
    warning:net.sf.hibernate.impl.SessionImpl <unclose connection>

    how can do this problem?
    can you give me some solve and some config option?

  2. #2
    Join Date
    Aug 2004
    Location
    Toronto, Canada
    Posts
    736

    Default

    Please take a look at some of the samples which come with Spring which use Hibernate, like "petclinic", along with the reference manual. You need to properly wrap your entire service layer with the use of something like HibernateTransactionManager so that all your DAOs end up using the same Hibernate Session.
    Colin Sampaleanu
    SpringSource - http://www.springsource.com

Similar Threads

  1. Generics and getHibernateTemplate()
    By bendg25 in forum Data
    Replies: 1
    Last Post: Jun 30th, 2005, 05:08 AM
  2. Replies: 1
    Last Post: May 28th, 2005, 07:34 PM
  3. getHibernateTemplate is null
    By Fez in forum Data
    Replies: 3
    Last Post: May 17th, 2005, 03:24 PM
  4. Replies: 1
    Last Post: Nov 26th, 2004, 09:24 PM
  5. getHibernateTemplate() returns null
    By gigi in forum Data
    Replies: 18
    Last Post: Nov 19th, 2004, 09:31 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •