Win a copy of Beginning Java 17 Fundamentals: Object-Oriented Programming in Java 17 this week in the Java in General forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Junilu Lacar
  • Rob Spoor
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Tim Moores
  • Jesse Silverman
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Piet Souris
  • Frits Walraven

HibernateTemplate or HibernateDaoSupport or Hibernate core

 
Ranch Hand
Posts: 191
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
ranger
Posts: 17346
11
Mac IntelliJ IDE Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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
 
WHAT is your favorite color? Blue, no yellow, ahhhhhhh! Tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic