I have a followup question on this for the list:  should the lock
discovery propfind call that's made during the construction of a
WebdavResource with BASIC or higher action be processing the returned
lock discovery data into a lock list?  From what I can see this isn't
happening but maybe I'm missing it. Wouldn't it be a performance
improvement to have the locks available immediately?  Is there any
downside to processing the lock discovery element at that time?

Thanks,
Warwick



> -----Original Message-----
> From: Warwick Burrows 
> Sent: Wednesday, March 16, 2005 4:36 PM
> To: Slide Users Mailing List
> Subject: RE: Locking Question
> 
> 
> 
> You _may_ need to make a "lock discovery" call before you go 
> to unlock a file. That will go out to Slide and pick up the 
> list of current locks for the resource. The locks are kept in 
> the WebdavResource object that you construct to lock the 
> resource but if you use another WebdavResource to unlock it 
> then you need to first discover what locks the resource has. 
> I made this change to my client at one stage when I noticed 
> that the locks weren't passed to the server during 
> checkin/checkout calls on resources that were already locked. 
> There's a discoverOwnLocks(String
> user) method in the WebdavResource that lets you discover the 
> locks for a particular user.
> 
> Now having said this I would have thought that any locks on 
> the resource should be discovered automatically when you 
> construct the WebdavResource object with at least the BASIC 
> "action" as this level of property detail fetches the lock 
> details. But from a quick look at the
> setWebdavProperties() call it looks like we fetch the lock 
> discovery property but it isn't processed into a list of 
> active locks that is kept in the resource state. Calling 
> discoverLock() does do this. New locks are also added to this 
> list whenever the lockMethod is called.
> 
> Warwick
> 
> 
> 
> > -----Original Message-----
> > From: John Gilbert [mailto:[EMAIL PROTECTED]
> > Sent: Wednesday, March 16, 2005 3:20 PM
> > To: slide-user@jakarta.apache.org
> > Subject: Locking Question
> > 
> > 
> > 
> > I have successfully locked a resource. However, when I try to
> > unlock it the return value of WebResource.unlock() is false, 
> > but the status code is 200. The resource stays locked. Any 
> > ideas why I am getting these conflicting messages? Is there a 
> > way to see the actual XML that is returned?
> > 
> > Here are examples of my method calls.
> > 
> > lockMethod(path, user, LockMethod.TIMEOUT_INFINITY,
> > LockMethod.SCOPE_EXCLUSIVE) unlockMethod(path, user)
> > 
> > Also, it only seems that I have this problem when I lock the
> > resource in one session and then come back later and try to 
> > unlock in a different session (same user).
> > 
> > Thanks
> > John
> > 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to