[Zope-dev] zope.component.zcml and global registry

Hanno Schlichting hanno at hannosch.eu
Wed Mar 3 07:31:54 EST 2010


On Wed, Mar 3, 2010 at 11:12 AM, Roger <dev at projekt01.ch> wrote:
> I like to use getGlobalSiteManager by default because this
> doesn't force a database access and load the local site
> manager if the site is a local site.

The database access only happens if a local site is set into the
corresponding thread local. But such a site is only set up when
traversing over the application root via some events.

At the point in the startup process when ZCML is processed, there's no
traversal events setup that could cause this and nothing should open
the database connection and traverse over it either.

So +1 on using getSiteManager instead of getGlobalSiteManager.

Hanno


More information about the Zope-Dev mailing list