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:
-
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.
-
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.
-
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.
-
Change every
reference = new Whatever(...) to
reference = new Whatever(...)._persist_getOID()
-
Change access to these Persist_OID's to a flavor of
Persist_OID->getReference().
-
Prepend assignments to the Persist_OID's so they inform the OM of
the change. This implements a reference count.
-
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.
|