Can't this object be smart enough to manage itself?

I understand we have some String based SchemaObject properties that act as references to other functional SchemaObjects which they need access to for proper schema operation.  And sometimes we have delayed calls to set the Registries reference which is used by these SchemaObjects to resolve the String property to the functional SchemaObject they depend on. 

Why not allow the property setters to function in the presence or absence of Registries where:

  (1) if no registries are present they just update the String reference
  (2) if registries are present they update the String reference and their reference to the respective functional SchemaObject

When the Registries reference is set or reset, the cached functional SchemaObjects are updated.  Or just merely delay lookups in the registries until the functional SchemaObjects are needed (think we do that now).  However if the registries are not set and they are needed an IllegalStateException can be thrown.


Alex Karasulu
My Blog ::
Apache Directory Server ::
Apache MINA ::