1.3. Orthogonal Persistence

Java is an object-oriented language, and developers inherently work with objects, which at any time have a state represented by member variables. From the Java developer's perspective, persistence focuses on the fact that the state in these objects should be available after the Java virtual machine has exited. For example, an application passing and using an instance of an Order class should be capable of recreating the Order instance after a machine reboot, or a year later when the account is audited.

The traditional programming approach has been to acquire the relevant state information and store it externally in some form – for example, using a relational database. When required, a new object instance is created ...

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.