[Zope-CMF] Re: five.intid and DirectoryView
Ross Patterson
me at rpatterson.net
Thu Jun 26 16:08:43 EDT 2008
"Martijn Pieters" <mj at zopatista.com> writes:
> On Thu, Jun 26, 2008 at 7:15 PM, Ross Patterson <me at rpatterson.net> wrote:
>>> I think because they are also used to create TTW skin objects; hit
>>> 'customize' on one such object in the skins directory and a copy is
>>> created that *is* persisted.
>>
>> So wouldn't that mean that DirectoryView should not store instances of
>> FSObjects in a registry stored in global state and shared between ZODB
>> connections?
>
> I don't see why not. Those stored in the global state are not the
> persisted objects, only those loaded from filesystem files.
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.
Ross
More information about the Zope-CMF
mailing list