• 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
  • Tim Cooke
  • paul wheaton
  • Paul Clapham
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Roland Mueller
  • Piet Souris
Bartenders:

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.
 
reply
    Bookmark Topic Watch Topic
  • New Topic