Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JDO: Events ?

 
Rama Raghavan
Ranch Hand
Posts: 116
  • Mark post as helpful
  • send pies
  • 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 ?
 
David Jordan
Author
Ranch Hand
Posts: 66
  • Mark post as helpful
  • send pies
  • 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.
 
Gregg Bolinger
Ranch Hand
Posts: 15304
6
Chrome IntelliJ IDE Mac OS X
  • Mark post as helpful
  • send pies
  • 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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic