By implementing callback methods, an application can intercept some of the above lifecycle events. There are three major cases in which an application developer might wish to implement some special behavior of persistent classes. These cases are as follows:
Read or write data of fields that is not persistence-capable or should not be stored by the default JDO algorithm
Delete contained objects
Clear unneeded references
The callback methods are placed in an extra interface, which is handled like the java.io.Serializable tag interface. If a persistence-capable class implements the InstanceCallbacks interface, the callback methods are called by the JDO implementation; otherwise, they are not called.