This looks reasonable to me. Stupid you're not. ;-) The external data container timeout looks like it might be a bug. I'll need to check it out, but it won't be until midweek. Randy, if this mounting stuff continues to work for you, might you turn this into a HOWTO? ----- Original Message ----- From: "Randall F. Kern" <randy@spoke.net> To: <zope@zope.org> Sent: Sunday, February 18, 2001 5:16 PM Subject: [Zope] CoreSessionTracking: Initializing a new berkeley storage My goal is robust session storage, using CoreSessionTracking 0.7. I've got (all running on a single linux box): ZEO, providing two storages: 1. FileStorage (with the name 'main') 2. BerkelyStorage (named 'session') Zope 2.3.0: With a custom_zodb.py file, which uses a ClientStorage to connect to ZEO using the 'main' storage. External Method: Inside the Extensions directory of my Product directory, I've got a SessionMount.py, with a function that returns a ZODB.DB() on another ClientStorage talking to the same ZEO but using the 'session' storage. Now I try to add an External Method Mount. I give it the module ZSpoke.SessionMount (my product is named ZSpoke- this seems to work fine.) I set the function to createSessionDB(), also works. The path is set to /session_storage. This results in an error from MountPoint._getMountRoot: "No 'Application' object exists in the mountable database." So... I started python and made an application object and a session_storage folder: Python 1.5.2 (#2, Nov 14 2000, 17:28:06) [GCC egcs-2.91.66 19990314/Linux (egcs- on linux2 Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam
import Zope Applying TransparentFolders patch version 0.3. from Products.ZSpoke.Extensions.SessionMount import createSessionDB db = createSessionDB() conn = db.open() root = conn.root() from OFS.Application import Application app = Application() root['Application'] = app get_transaction().commit() from OFS.Folder import Folder folder = Folder() folder.id = 'session_storage' folder.title = 'Session Storage' app._setObject('session_storage', folder) 'session_storage' get_transaction().commit() conn.close()
Then I added an External Session Data Container inside the session_storage folder, and changed my Session Data Manager to use it. Everything seems to work, but I'm very unsure :) One small problem I've noticed is the 'Data object timeout value in minutes' property on the Manage tab of the External Session Data Container is always 0, even if I try to change it. Anyone have any ideas, confirmation, I'm stupid, etc? Thanks! -Randy _______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )