[ZODB-Dev] Locking

Andreas Jung lists at zopyx.com
Thu Jul 3 00:59:23 EDT 2008



--On 2. Juli 2008 16:45:53 -0400 Joseph Turian <turian at gmail.com> wrote:

> How do I "lock" zodb objects?

Zope provides locking for WebDAV under the hood. Means you can not 
lock/unlock objects directly through the Zope UI (except the global webdav 
lock manager in the ZMI for _unlocking_ content).


>
> I want the following process:
>
> See if key is present in root.
> [it's not]
> Lock key write-access, so that no other client will try to write key.
> Compute value for key.
> Write value for key.
> Unlock key.
>

Look at Plone utilizing the webdav locks for app-level locking support.
Or: you can the API in Zope for using the webdav locks (somewhere in the 
'webdav' module, check yourself).

-aj
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 194 bytes
Desc: not available
Url : http://mail.zope.org/pipermail/zodb-dev/attachments/20080703/e6054951/attachment-0001.bin


More information about the ZODB-Dev mailing list