[ZODB-Dev] Webkit Threading and ZODB 3.3a2: problems on Windows
Dieter Maurer
dieter at handshake.de
Thu Feb 19 14:54:29 EST 2004
Matt Feifarek wrote at 2004-2-18 13:41 -0500:
> ...
>2) add a seemingly superfluous get_transaction().abort() call just
>before the servlet is put to sleep (and before the database connection
>is closed) by the app server; apparently, if you make this call (even
>when you've made no changes) a side effect is precluding whatever
>circumstances are leading to the real problem
It is a very good idea to always finish a request with a call
to either "commit" or "abort".
Otherwise, the next request can get a connection with objects in
an undefined state. If it gets a different thread id (than
the previous request that used this connection), a commit
of this (new) transaction will not be able to make objects
with "_p_changed=1" persistent (as they are registered with a
different transaction).
--
Dieter
More information about the ZODB-Dev
mailing list