Thanks, Alessandro,

I have added this to the Wiki...

Oliver


On Mon, 22 Nov 2004 10:58:16 +0100, Alessandro Apostoli
<[EMAIL PROTECTED]> wrote:
> Hi Oliver,
> 
> I made it work on the weekend...
> To summarize things up:
> I have a static Map to hold the lockids to be returned
> by getLockInfo(). Every call to lockObject() generates
> an exclusive lock on my proprietary system and stores
> the pair (uri,lockId) in the map for later retrieval, this for
> webdav locks only.
> Each call to getLockInfo() first checks if there is a lock
> in the proprietary system and if not it returns a SimpleLock[0]
> If  the resource is locked it has to determine if it was locked
> via webdav or via proprietary interface so it checks if there's an
> entry in the map for that lock. If so it returns it, if there's no entry
> in the map and the resource is locked it has to generate a valid
> lockId, store it in the map for subsequent calls to getLockInfo()
> and return it. My system supports only one lock per resource so
> the key in my map is the uri, I also used the uri to generate the
> lockId string with a call to DigestUtils.md5Hex(uri).
> As one might  expect a call to unlockObject() removes the entry
> from the map and unlocks the resource.
> 
> That's all folks
> 
> Alessandro.
> 
> ---------------------------------------------------------------------
> 
> 
> 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