• 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:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Devaka Cooray
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Tim Moores
  • Carey Brown
  • Mikalai Zaikin
Bartenders:
  • Lou Hamers
  • Piet Souris
  • Frits Walraven

What is the use of Hibernate Callback interface?

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Can someone please explain what is the use of HibernateCallBack interface?

I have googled something related to this and understood that it will notify the changes made to the persistent objects. Is my understanding correct? Please someone clearly explain me what it does and when to use this interface. I have gone through the internal implementation of hibernate template and observed all the operations performed on persistent objects like save,delete, load etc are using this interface.

A good explanation is appreciable.

Thanks in advance.
 
Bartender
Posts: 1682
7
Android Mac OS X IntelliJ IDE Spring Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I know this does not answer your question directly but don't use HibernateTemplate/HibernateDaoSupport it isn't recommended use the SessionFactory directly.

As a matter of fact as of hibernate 4 its not only not recommended but it has been removed altogether. See the below Jira
https://jira.springsource.org/browse/SPR-8096

Eliminate HibernateTemplate and friends (e.g. HibernateCallback in favor of Spring's more modern 'Native Hibernate DAO' approach




Unless you are using a very old version of hibernate in a legacy application it should be avoided.
 
The two armies met. But instead of battle, they decided to eat some pie and contemplate this tiny ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic