Package org.dellroad.stuff.pobj


package org.dellroad.stuff.pobj
Simple XML Persistence Objects (POBJ).

This package implements a library for simple persistence of Java objects via XML. It's targeted at Java data structures that are small enough to fit in memory and which are read much more often than they are written, and can be persisted as an XML file. A good example would be configuration information for an application.

Attributes and features:

  • Able to persist an arbitrary java object graph - you supply the XML (de)serialization strategy
  • Automatic support for deep copying the object graph
  • Read access uses natural Java
  • Changes are atomic, serialized, wholesale updates
  • All changes must fully validate
  • Versioning support for optimistic locking
  • Support for "out-of-band" persistent file updates
  • Support for automatic re-indexing on change
  • Support for listener notifications on update
  • Support for schema updates via XSLT transforms using the org.dellroad.stuff.schema classes
  • Support for JTA/XA transactions

The primary class is PersistentObject. Typically this class would be accessed through a PersistentObjectSchemaUpdater which allows for evolution of the XML schema over time; see SpringPersistentObjectSchemaUpdater for an example of Spring configuration.

A PersistentObjectTransactionManager for use with Spring's transaction support is also provided.

See Also: