hi

actually I don't think this is a webdav issue, it's more a question about unlocking files, locked by a previous session.

that's what the error says. but it can still be
a webdav issue.

with the default setup of the simple dav-servlet
the lock tokens get removed from the session before
it is logged out. if a new session is obtained the
lock-tokens retrieved from the dav-request headers
are put to the session.

thus: implicit lock token transfer.
the only thing that is required is, that the client
sends the correct lock token with a modification request
(If-Header) or an unlock request (Lock-Token header).

this is basically what i wanted to take a closer
look at in the conversation.

AFAIK I need the lock token for unlocking a file.

correct. as far as i know it is the client's
responsibility to send the lock token it
obtained from the LOCK request or a PROPFIND for
DAV:lockdiscovery

This token is hold by the session created this file.

is hold by the session that created the lock by
calling LOCK in webdav or (alternatively) interally
by calling javax.jcr.Node.lock().

What if the session has ended?

if the session has ended it depends on the type of
JCR lock you created:
- session-scoped locks are automatically removed
  (not used with the simple dav servlet)
- for open-scoped locks the lock token must be
  retrieved from the lock-holding session before.
  then removed from that session and later on
  added to second session to make the second
  become the lock-holder.
  -> see above for the logic implemented in the
     simple server.

So my question should be: How can I get the lock token from another (maybe allready ended) session?

yes, if you retrieved the lock token AND remove it
from the session that is going to be logged out.

see Session#getLockTokens/addLockToken/removeLockToken
for the corresponding instructions.

By the way, how can I trace the http conversion of a windows network drive?

i use to connect to a proxy that logs the conversation instead
of connecting to the server directly. i guess there is
some sort of free available equivalent to that helper.

angela

Reply via email to