[ZODB-Dev] Threads and Connections
Chris S
chrisspen at gmail.com
Wed Jul 26 16:03:52 EDT 2006
On 7/26/06, Gary Poster <gary at zope.com> wrote:
>
> >> The reason why I'm doing this is because I'm trying to update the
> >> classes of persistent objects loaded into memory.
>
> Want to elaborate on this a bit? It sounds like stuff other folks
> have done, but you might want to give more detail.
When a file containing source code is modified, I want to reload it
using Python's reload() function, then update classes with the new
definitions. I have application-level logic to ensure the objects are
in a sane-state during update. The only problem I'm having is when I
close the connection after an update, I get ConnectionStateError,
"Cannot close a connection joined to a transaction". Setting
conn._needs_to_join = True appears to fix this, but it's too much of a
hack and I have to test it further.
There was similar discussion regarding the "reloading product" over a
year ago, but this functionality is specific to Zope, which I'm not
using. Also, it seems unmaintained and unreliable, and my have been
deprecated.
Chris
More information about the ZODB-Dev
mailing list