[Zope-dev] How would I keep _v_* attributes from getting thrown away?

Dieter Maurer dieter@handshake.de
Mon, 22 Jan 2001 19:36:26 +0100 (CET)


John D. Heintz writes:
 > I am using ZODB along with CORBA to expose peristent objects.  Some of 
 > my objects have per-connection/session state.
 > ...
 > My initial idea is to have a _v_position attribute ...
Using "_v_" attributes for session state is a very bad idea.
They are thread(!) local and not session local.
This means, if a following request of your user (in the same session)
happens to get assigned a different thread, it will read
and update a different position. Chaos is garanteed (though you
will see it only, if your site is loaded).

Use a session product (-> zope.org) for session data.


Dieter