• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

JDO: Events ?

 
Ranch Hand
Posts: 116
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
While were are at it, thought I'd ask..
Are there a pre/post events that consumers can register for, and be notified, when the state of an object changes and is persisted ?
Is there any event model for JDO ?
 
Author
Posts: 66
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes, JDO has 4 events:
jdoPostLoad()
jdoPreClear()
jdoPreDelete()
jdoPreStore()
These are methods defined on an interface called InstanceCallbacks. If you want to execute some code when these events occur, you must declare your class implements InstanceCallbacks. These methods are called when the event occurs.
 
Ranch Hand
Posts: 15304
6
Mac OS X IntelliJ IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by David Jordan:
Yes, JDO has 4 events:
jdoPostLoad()
jdoPreClear()
jdoPreDelete()
jdoPreStore()
These are methods defined on an interface called InstanceCallbacks. If you want to execute some code when these events occur, you must declare your class implements InstanceCallbacks. These methods are called when the event occurs.


Now that is a nice Interface.
 
reply
    Bookmark Topic Watch Topic
  • New Topic