Announcement Announcement Module
Collapse
No announcement yet.
"unclose connection" when use getHibernateTemplate Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • "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
    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.

    Comment

    Working...
    X