jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jukka Zitting <jzitt...@adobe.com>
Subject RE: version control basics
Date Wed, 03 Nov 2010 09:58:55 GMT

From: ChadDavis [mailto:chadmichaeldavis@gmail.com]
> In particular, I'm looking to implement locking of a document by an
> author.  I'm trying to decide between whether the locking api or the
> version control api's checked-out state are more appropriate.  I've
> read a lot of older threads on this list, but couldn't find a
> satisfactory explanation.

If all you need is locking, then using the JCR locking feature is probably more appropriate
than relying on the checked in / checked out states of JCR versioning.

The versioning feature only cares about the state of the versioned document, not about which
user or client is accessing it. To summarize: nobody can modify a checked in document, and
everyone can modify a checked out document.

The locking feature does care about who is accessing the document; only the holder of an active
lock can modify a document.

So if you want per-author locking, the JCR locking feature seems like the most appropriate


Jukka Zitting
View raw message