[Zope] Zope and Threads
Johan Carlsson
johanc@easypublisher.com
Fri, 11 Jul 2003 15:08:38 +0200
Johan Carlsson wrote:
> Johan Carlsson wrote:
>
> For the Xron product I have found this,
> which might be a better way to access the
> Application object?:
>
> app=ZODB.ZApplication.ZApplicationWrapper(
> DB, 'Application', OFS.Application.Application, (),
> Globals.VersionNameName)
Note also that the Zron product uses
AccessControl.SecurityManagement.newSecurityManager
to log on as system user before creating the app object:
# "Log on" as system user
AccessControl.SecurityManagement.newSecurityManager(None,
AccessControl.User.system)
# Set up the "application" object that automagically opens
# connections
app=ZODB.ZApplication.ZApplicationWrapper(
DB, 'Application', OFS.Application.Application, (),
Globals.VersionNameName)
# "Log off" as system user
AccessControl.SecurityManagement.noSecurityManager()
--
Johan Carlsson Tel: + 46 8 31 24 94
Colliberty Mob: + 46 70 558 25 24
Torsgatan 72 Email: johanc@easypublisher.com
SE-113 37 STOCKHOLM