Christian Theune wrote:
Isn't the global site manager something else then zope.component?
No. The global site manager (we prefer to call it global component
registry nowadays) is defined in zope.component. It is always htere.

Because zope.component uses the current thread-local site-manager,
depending on what was set during traversal etc., isn't it?
Nope. zope.component knows nothing about thread-local site managers.
That's zope.app.component (which hooks its knowledge of thread-local
site managers into zope.component).

So why does zope.component.getUtility return local utilities then?

Lol, do I have to write everything twice?

Last sentence, in the parentheses:

  "zope.app.component hooks its knowledge of thread-local site managers
  into zope.component"

Basically, look at zope.app.component.hooks, especially setHooks. Unless setHooks is actually executed, zope.component knows NOTHING about local utilities.

Philipp
_______________________________________________
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com

Reply via email to