O'Reilly logo

Core Java™ Data Objects by Heiko Bobzin, Michael Vorburger, Keiron McCammon, Sameer Tyagi

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required