[Zope3-Users] Questions about utility/service registration
Sven Schomaker
Sven.Schomaker at linie-m.de
Fri Jan 28 04:11:48 EST 2005
Hello all,
I've got a question about the registration of local services/utilities
at the
SiteManagementFolder. The registration of services (e.g.) seems to be
performed in the following manner:
sm_folder = zapi.traverse(folder.getSiteManager(), "default")
sm_folder['Utilities'] = LocalUtilityService()
rm = sm_folder.getRegistrationManager()
key =
rm.addRegistration(ServiceRegistration(zapi.servicenames.Utilities,
sm_folder['Utilities'], rm))
zapi.traverse(rm, key).status = ActiveStatus
Now as I figured out from the registration package, there may
registration
multiple components under a given name which is handled by means of a
registration stack.
Now that I add one component to the sm_folder and register it at the
registration manager how would one register another version of that
component, since the sm_folder will only accept one item for a given
name and reassignment will raise a DuplicateError.
Would one only register the new version of the component at the rm
without assigning it to the sm_folder.
I wonder how the SiteManagementFolder and the registration stack are
actually related and why one must both add the component to the
SitemanagementFolder and to the RegistrationManager. So far I'm a bit
stuck about this issue and would appreciate some help.
Thanks in advance,
Sven
More information about the Zope3-users
mailing list