[ZODB-Dev] Re: Dynamically Updating Objects

Chris S chrisspen at gmail.com
Tue Jul 18 10:23:00 EDT 2006


I think I may have found a similar feature in ZODB, but I'm not sure
how I'm supposed to access it. In connection.py, the docstring for
resetCaches() mentions it's used by Zope's refresh feature, and that
objects are refreshed after connections are reopened. Is the only way
to refresh classes in ZODB to first close all connections, call
resetCaches(), then reopen the connections?

Chris

On 7/14/06, Chris S <chrisspen at gmail.com> wrote:
> I have a small module that can dynamically update code objects in
> memory after reloading their module (http://paste.plone.org/5431). It
> greatly simplifies debugging during development. However, as you might
> expect, at best it doesn't work at all for ZODB, and at worse it
> sometimes causes ZODB to raise exceptions like:
>
> transaction.commit()
> self.conn.close()
> File "C:\Program Files\Python24\Lib\site-packages\ZODB\Connection.py",
> line 232, in close
>     raise ConnectionStateError("Cannot close a connection joined to "
> ZODB.POSException.ConnectionStateError: Cannot close a connection
> joined to a transaction
>
> Is there any way to dynamically replace the class objects so ZODB can see them?
>
> Chris
>


More information about the ZODB-Dev mailing list