-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: connection open and close
PostPosted: Wed Mar 19, 2008 6:27 am 
Newbie

Joined: Tue Mar 18, 2008 2:07 pm
Posts: 10
Hi frndz,
Am new to Hibernate. Now am extending the HibernateDaoSupport so i have been using hibernatetemplate to open the connection.


For execute the query am using getHibernatetemplate.find('query');

Its executing correctly. NOw i have doubt whether connection closed automatically or we have to close

Another question,
Whether using SessionFactory or HibernateTemplate is best practise. Please Help me

Thanks in Advance.

Regards,
Sivaprakash.G


Top
 Profile  
 
 Post subject:
PostPosted: Wed Mar 19, 2008 8:59 am 
Expert
Expert

Joined: Fri Aug 19, 2005 2:11 pm
Posts: 628
Location: Cincinnati
Spring's HibernateTemplate is supposed to manage the connections for you.

If you want better control over connections and sessions, you would probably want to implement your own generic DAO/query implementation

_________________
Chris

If you were at work doing this voluntarily, imagine what you'd want to see to answer a question.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.