hi julian Julian Reschke wrote:
as far as i know, the <locktoken> element is present in the lock-discovery property if the jcr-session that has been attached to the request is the lock-holder.
Hm, is that a voluntary restriction in the WebDAV layer?
no.... (see below)... or do you mean something else?
otherwise it's omitted. this is mainly due to the nature of the the JCR-Lock that is created by default: the JCR Lock object only reveals the lock token if the Session that obtained the lock from the node is the lock-holder.
Isn't that incorrect for open-scoped locks?
you mean in terms of jcr? no.... not that i would know of. the semantics of javax.jcr.lock.Lock.getToken() will change slightly with jsr283 (regarding session-scoped locks) but for with jsr 170 its defined to be: "If this <code>Session</code> holds the lock token for this lock, then this method will return that lock token. If this <code>Session</code> does not hold the applicable lock token then this method will return null." and the dav-layer only uses open-scoped locks (if i'm not mistaken). angela
