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 the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.