persistence : Java Glossary
©1996-2017 2008-08-19 Roedy Green of Canadian Mind Products
Writing Java objects to disk in a way that they can be read back in again later.
- The most common mechanism is serialization.
- The Preferences
API (Application Programming Interface) lets you persist small amounts of data without
having to allocate files.
- The Properties class works for String persistence.
Oracle’s Javadoc on Properties persistence
- Applets have AppletContext.
setStream to allow a session to leave notes for
Oracle’s Javadoc on AppletContext.setStream persistence
- There is the Preferences class for storing
information in the registry or equivalent, which requires signing in Applets. Preferences
store information in a very fluffy format. The registry is notoriously fragile and
is difficult to backup/restore.
Oracle’s Javadoc on Preferences persistence
- For heavy duty applications you use a POD (Persistent Object Database).
And, of course, you can store data in ordinary flat files, either in binary or
- In EE (Enterprise Edition), there in a
aka JPA (Java Persistence Api), that uses an XML (extensible Markup Language)
format. It is quite complicated with entities and a query language. Hibernate is a superset of this
- Even an SQL database could be considered
a sort of persistence mechanism, though term usually implies saving a complex
structure, not just simple records.