You won't be able to session data objects from the RAM-based container
without special treatment in your main storage, because "under the hood" the
internal data container uses a mounted RAM-based storage. See the section
in the help/CoreSessionTracking.stx file that ships with the release named
"Mounted Database-Based Session Data Container/Internal Session Data
Container Caveats". The example provided is the desire to store an object
defined in your "main" database into session storage, but it works the other
way round as well.
While what you ask is doable with a little ZODB magic (and possibly
without), I'd recommend instead that you just use an "external session data
container" (which stores these objects in persistent storage right off the
bat) set up with a long timeout, so that when you shut down Zope and bring
it back up your session data won't have disappeared.
----- Original Message -----
From: "Andy McKay" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, January 29, 2001 6:19 PM
Subject: [Zope-dev] Storing session objects in a ZODB
> I want to store the session objects (from CoreSessionTracking) in the ZODB
> so that users can save preferences (set in a Session) and call them back
> later. Just thinking that the easiest way to something is to pickle it,
> pickling it in the ZODB which then pickles it, seems daft. Someone
> I could just _setObject into the ZODB, but don't I still need to make a
> class wrapper around this?
> Has anyone tried this? I couldn't spot anything in the CoreSessionTracking
> API that obvious...
> Andy McKay.
> Zope-Dev maillist - [EMAIL PROTECTED]
> ** No cross posts or HTML encoding! **
> (Related lists -
> http://lists.zope.org/mailman/listinfo/zope )
Zope-Dev maillist - [EMAIL PROTECTED]
** No cross posts or HTML encoding! **
(Related lists -