Home
Overview
Architecture
Language
Weave
Implementation
Licence

Weave Points

Due to persist's architecture, the number of weave points that the weaver has to consider is low. Here is the list of changes that have to be made to make persistence work:

  1. Add a field of type Persist_OID, to be set then the constructor of the persistent class is called. The OID is aquired from the OM.
  2. Add the interface Persist_Object to those objects which don't yet implement Serializable, also create a sort of a default implementation, and issue a warning. Add _persist_getOID() method.
  3. Change every persistent object's references to other persistent objects to a Persist_OID. These implement persistency of references, and keep track of an object's reference count.
  4. Change every reference = new Whatever(...) to reference = new Whatever(...)._persist_getOID()
  5. Change access to these Persist_OID's to a flavor of Persist_OID->getReference().
  6. Prepend assignments to the Persist_OID's so they inform the OM of the change. This implements a reference count.
  7. For each method parameter that is a persistent object reference, create a PersistOID-type equivalent, and use that from that point on. This is the only problematic weave point, because persistent objects could be passed as Object, or in a mixed array... The sad fact of life is that there's no simple and fast way to tell, unless you check every reference, which would be both inacceptably slow, and next to impossible.