[z3-five] Programmatic initialization of utilites during the Zope startup phase

Andreas Jung lists at zopyx.com
Wed Mar 21 06:59:27 CET 2007


Hi,

I have the need to register some utilities dynamically during the startup 
phase of Zope. In detail: I have a product that uses z3c.sqlalchemy (a Zope 
3 database adapter for Zope2/3). During the startup I need to read some
database configurations from a configuration file and setup a named utility
for each of the database configurations. I can't and don't want to do that
in ZCML. However the Zope product initialization happens before the Zope 3
registry stuff is available. I have a workaround with a setup utility
registered through ZCML that performs the registration of the utilities
after Zope is up and before answering to the first product specific request.
This works but I consider this to be an ugly workaround. Any ideas
for a better solution?

Andreas
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 186 bytes
Desc: not available
Url : http://codespeak.net/pipermail/z3-five/attachments/20070321/27661cf9/attachment.pgp 


More information about the z3-five mailing list