You are viewing a plain text version of this content. The canonical link for it is here.
Posted to slide-dev@jakarta.apache.org by Robert Owen <eu...@sas.com> on 2001/08/21 18:13:55 UTC

LOCK problems

I am using Slide's webDAVResource and running into some issues with the
lockMethod().After successfully doing a LOCK, it calls setProperties. This
goes through propFindMethod (generating a PROPFIND), which sets the status
code on the resource to that of PROPFIND and no longer the LOCK (this is
also true of many of the other methods eg. DELETE (which usually gives 404
as the resource has been deleted), UNLOCK, etc.). 

I guess it's trying to get the LockToken from the extra propfind, although
this seems wasteful if/when it is returned in the LOCK response. It would be
nice if the internally generated propfindMethod did not change the
statuscode, as this hides the code for the previous method. The extra
PROPFIND method is going to increase network traffic ... I suppose this is
the only way to keep current with the resources properties on the server.

Changing to use the lockMethod(String path) method, does not do the
setProperties, which means that the LockDiscoveryProperty is not found and
so ActiveLocks doesn't work, even though the LOCK is in place. Any
suggestions on the recommended use of the lockMethod on WebDavResource ?   

Re: LOCK problems

Posted by Dirk Verbeeck <di...@pandora.be>.
Robert Owen wrote:

> I am using Slide's webDAVResource and running into some issues with the
> lockMethod().After successfully doing a LOCK, it calls setProperties. This
> goes through propFindMethod (generating a PROPFIND), which sets the status
> code on the resource to that of PROPFIND and no longer the LOCK (this is
> also true of many of the other methods eg. DELETE (which usually gives 404
> as the resource has been deleted), UNLOCK, etc.).
>
> I guess it's trying to get the LockToken from the extra propfind, although
> this seems wasteful if/when it is returned in the LOCK response. It would be
> nice if the internally generated propfindMethod did not change the
> statuscode, as this hides the code for the previous method. The extra
> PROPFIND method is going to increase network traffic ... I suppose this is
> the only way to keep current with the resources properties on the server.
>
> Changing to use the lockMethod(String path) method, does not do the
> setProperties, which means that the LockDiscoveryProperty is not found and
> so ActiveLocks doesn't work, even though the LOCK is in place. Any
> suggestions on the recommended use of the lockMethod on WebDavResource ?

Indeed, you would expect that the status code from the lockMethod is kept.
Maybe we can store the status, do setProperties and then set the status back ?
Objections ?

By the way, if you have testcases or even just examples please submit them.
The slide community will be gratefull and you will be sure this bug will be gone
forever...
If we don't forget to run the tests... ;-)


Dirk