If I have a utility component whose initializaiton depends on the
availability of another utility, the initialization fails with a
Component Lookup Error. It seems that in the ZCML file, the utility
components are first created, and then at the end of the whole
configuration, they are registered. So if in the initilization code of
utility B I need to look up a utility A, the ZCML configuration will
As an example, I have a utility that reference a z3c.zalchemy engine.
engine = getUtility(z3c.zalchemy.interfaces.IAlchemyEngineUtility,
And the configuration goes like this:
url="some db url" />
The problem is that although the z3c eninge object is created before
the 'utility' directive is executed, it is not registered and
therefore can not be looked up when the 'utility' directive tries to
create the MyUtility object.
How does one usually solve such interdependencies?
Zope3-users mailing list