Please note: this project is inactive since early 2006

 
6.4 Zope

The framework is shipped with a particular component, ZEditingContextSessioning, that makes it possible to have an EditingContext lazily created on a per-session basis.

When installed in the Products/ folder of a Zope instance, it automatically modifies the class TransientObject6.1 and adds a new method to it: defaultEditingContext. It also binds itself to the sessioning machinery so that the EditingContext attached to a session is automatically finalized when the session is expired.

Accessing the EditingContext bound to a particular session is as simple as calling defaultEditingContext() on the SESSION object.

Note: Zope does not immediately destroy expired sessions ; they are marked as expired and are only destroyed when a given thread is elected for doing the ''housekeeping'' (see lib/python/Products/Transience/Transience.py, method_getCurrentBucket()). This means that the defaultEditingContext assigned to a session will not be finalized when the session expires, but a certain amount of time afterwards.



Footnotes

...TransientObject6.1
The SESSION object is an instance of TransientObject


Subsections
Comments are welcome: Sebastien Bigaret / Modeling Home Page
Hosted by:SourceForge.net Logo