-->
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: Regarding Hibernate Template session
PostPosted: Sat Apr 27, 2013 2:49 pm 
Newbie

Joined: Sun Apr 21, 2013 12:35 pm
Posts: 4
Hi all,

Suppose i have a DAO class which is extending HibernateDAOSupport it that case

1. should i get the session using getSession() or getHibernateTemplate().getSession? which is better.

2. In either case do i need to close the session manually or not?

3. Lastly why using session.getcurrentsession is the best approach for spring hibernate integration..

Regards,
Shomit


Top
 Profile  
 
 Post subject: Re: Regarding Hibernate Template session
PostPosted: Sun Apr 28, 2013 3:53 am 
Regular
Regular

Joined: Wed Apr 10, 2013 1:02 am
Posts: 50
Hey man when you are using springs-hibernate support then depend completely on the api. In either case you have to close the session explicitly.

_________________
Regards
Akash Miital
http://akash.thegrassroots.co.in/hibernate/


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.