4.1. A Persistent Object's Lifecycle

JDO defines seven required and three optional states: transient, persistent-new, persistent-new-deleted, hollow, persistent-clean, persistent-dirty, and persistent-deleted are the mandatory lifecycle states. Transient-dirty, transient-clean, and persistent-non-transactional are optional states and are explained later in this chapter.

Some of the state transitions are directly triggered by the application itself—for instance, making an object persistent. Starting or terminating a transaction can also trigger an object's state change, which might be invoked directly by the application developer through a call to Transaction methods begin(), commit(), or rollback(). Note that in managed environments, state changes ...

Get Core Java™ Data Objects now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.