Defining and Handling Transient Fields in PJama
The transient keyword of the Java™ programming language was originally introduced to prevent specific class fields from being stored by a persistence mechanism. In the context of orthogonal persistence, this is a particularly useful feature, since it allows the developer to easily deal with state th...
Gespeichert in:
Hauptverfasser: | , , |
---|---|
Format: | Buchkapitel |
Sprache: | eng |
Schlagworte: | |
Online-Zugang: | Volltext |
Tags: |
Tag hinzufügen
Keine Tags, Fügen Sie den ersten Tag hinzu!
|
Zusammenfassung: | The transient keyword of the Java™ programming language was originally introduced to prevent specific class fields from being stored by a persistence mechanism. In the context of orthogonal persistence, this is a particularly useful feature, since it allows the developer to easily deal with state that is external to the system. Such state is inherently transient and should not be stored, but instead re-created when necessary. Unfortunately, the Java Language Specification does not accurately define the semantics and correct usage of the transient keyword. This has left it open to misinterpretation by third parties and its current meaning is tied to the popular Java Object Serialisation mechanism. In this paper we explain why the currently widely-accepted use of the transient keyword is not appropriate in the context of orthogonal persistence, we present a more detailed definition for it, and we show how the handling of transient fields can be efficiently implemented in an orthogonally per- sistent system, while preserving the desired semantics. |
---|---|
ISSN: | 0302-9743 1611-3349 |
DOI: | 10.1007/3-540-44543-9_9 |