"Martijn Pieters" <[EMAIL PROTECTED]> writes:

> On Thu, Jun 26, 2008 at 10:08 PM, Ross Patterson <[EMAIL PROTECTED]> wrote:
>> But since the FSObjects provide IPersistent, they can be added to a
>> connection.  If they're added to a connection, the object can be
>> ghosted when that connection is closed.  If another thread
>> subsequently consults the DirectoryView registry for the same object,
>> the persistnce machinery will raise ConnectionStateError when it
>> tries to de-ghost the object from the closed connection.
> But the code never does that. When cloning a file-based FSObject, a
> new instance is created and that is added to the ZODB. Noone else
> should do this either.

zope.app.keyreference does.  The persistence machinery doesn't add an
object to a connection until commit.  As such, an IPersistent and
IObjectAdded event handler, such as the one in zope.app.intid, that
needs the object to have a connection needs to add the object to a

Shouldn't anything that implements IPersistent be able to be added to a
connection?  Wouldn't that be considered part of providing the
interface?  Where else is an object that provides IPersistent stored in
global state?


Zope-CMF maillist  -  Zope-CMF@lists.zope.org

See http://collector.zope.org/CMF for bug reports and feature requests

Reply via email to