Forum OpenACS Development: Response to ACS 4 missing the parameters file

Collapse
Posted by Henry Minsky on
Well, OK, I am overlooking the fact that some packages are not mounted anyplace. So the file format above might not cover all cases.
In fact, I think it is the case that any packages which are not mounted also happen to be singleton packages, in which case we can
uniquely identify them by their package key. But depending on that to always be true
might not be smart.

So how about this then. We have a defpackage_param function which
takes an optional package instance id as an argument.

This will uniquely identify a package instance. If you go to reload the
params file and the specified package instance is not found, the loader could go ahead and instantiate a new instance, and keep a little mapping table in memory of the old instance id to the new one. Then when further parameter defs are found in the file, it would set those parameters on the new package instance.

That way we would cover the case where you've blown away your database, and just want to reconstruct the system to where it was before, in terms of mounted or instantiated packages and their parameters.