The following is a description of what the toolkit does to prepare to use
externalizers:
- When starting up, the toolkit reads the settings section of the toolkit
definition (dse.ini) file:
com.ibm.dse.base.Settings.reset( URL or Path );
The URL for the configuration file can be downloaded from
the Web server as a parameter of the startup applet. After installing the
toolkit, the configuration file for the client is located in <toolkit
root>\dse and the configuration file for the server is located
in <toolkit root>\dse\server.
- The toolkit initializes the externalizers.
com.ibm.dse.base.Settings.initializeExternalizers(com.ibm.dse.base.Settings.MEMORY);
- The externalizers read the generic toolkit definition files.
- The externalizers use the information contained in the definition file
to create the runtime tag structure in memory.
- The externalizers resolves references to other definitions (tag linking)
and updates the runtime tag structure.
Once the toolkit is initialized, the toolkit uses an externalizer in the
following way to initialize an object:
- The application requires a new instance of an object.
- The toolkit obtains the externalizer for the object.
- If the object cache for objects (formats and processors only) is enabled
and the object's class implements the Cacheable interface, the externalizer's
readObject method looks in the cache's Hashtable for the requested object:
- If the object is not in the cache, the externalizer continues this process
to initialize the object.
- If the object is in the cache, the externalizer returns the requested
operation and removes the reference to it from the cache Hashtable.
- The externalizer searches for the object definition in the runtime tag
structure in memory. The search order depends on the type of entity being
defined and whether the definition file is generic or self-defined. The externalizer
uses the first definition it finds.
- If the object definition has a defined implementation class (the implClass
attribute), the externalizer creates the object using that class. If the object
definition does not have a defined implementation class, the externalizer
uses the class defined in the generic toolkit definition (dse.ini) file.
- Once the externalizer has instantiated the object, it gets the object's
values from the object's tag using its initializeFromTag(Tag) method.
The externalizer then uses these values to initialize the object.
- The toolkit uses the object.
- If the object is cacheable and the application invokes the putIntoCache
static method in the object's externalizer, the toolkit stores object in the
appropriate object cache. The toolkit can then reuse it.