aspose file tools*
The moose likes Spring and the fly likes HibernateTemplate or HibernateDaoSupport or Hibernate core Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Spring
Bookmark "HibernateTemplate or HibernateDaoSupport or Hibernate core" Watch "HibernateTemplate or HibernateDaoSupport or Hibernate core" New topic
Author

HibernateTemplate or HibernateDaoSupport or Hibernate core

vikas sharmaa
Ranch Hand

Joined: Jun 28, 2007
Posts: 191
i am starting a new project using Spring and Hibernate.

i have a doubt regarding which approach to follow. HibernateTemplate or HibernateDaoSupport or some core Hibernate way (used in petclinic project).

please suggest.
pandya devarshi r
Greenhorn

Joined: Sep 04, 2008
Posts: 5
Hi Vikas,

You can use the HibernaeTemplate instead of HibernateDAO support. In HibernateDAO support you need the HibernateTemplate reference using getHibernateTemplate() method.
Additionally implemented the spring/hibernate you can develop your own class which is extends the HibernateTemplate class.
Your class defination is defined in the web.xml file.


Regards,
Devarshi
Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17250
    
    6

vikas sharmaa wrote:i am starting a new project using Spring and Hibernate.

i have a doubt regarding which approach to follow. HibernateTemplate or HibernateDaoSupport or some core Hibernate way (used in petclinic project).

please suggest.


If you are using Hibernate 3.1 or above, I would say neither. Inject a SessionFactory into your DAO/Repositories instead. In these versions of Hibernate you will get no benefit from HibernateTemplate or DaoSupport classes.

Mark


Perfect World Programming, LLC - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: HibernateTemplate or HibernateDaoSupport or Hibernate core