Sun Java System Web Server 7.0 Update 4 Administrator's Guide

Minimum Lock Timeout

You can control locking by configuring the value of the minlocktimeout attribute of the DAV or DAVCOLLECTION objects in the server.xml file. The minlocktimeout attribute specifies the minimum lifetime of a lock in seconds. This value indicates the amount of time that an element will be locked before the lock is automatically removed.

This is an optional attribute. If the value is set to -1, the lock will never expire. Setting the value to 0 enables all the resources in the collection to be locked with the Timeout header specified in the request.

If no Timeout header is specified, then the resource is locked with infinite timeout. If a request has a Timeout header set to the value Infinite, then also, the resource is locked with infinite timeout.

If the request for a WebDAV resource has a Timeout header value that is equal to or greater than the minlocktimeout value specified in server.xml, then the resource is locked for the period of time specified in the request.

However, if the request has a Timeout header value that is lower than the minlocktimeout value specified in server.xml, then the resource is locked with the minlocktimeout value specified in server.xml.

The following table illustrates how the server handles locking requests:

Table 10–3 How Sun Java System Web Server handles locking requests

If Timeout header value in Request is set to:  

The resource is:  

Infinite

Locked with timeout set to -1 (infinite) 

None 

Locked with timeout set to -1 (infinite) 

Second-xxx

  • Locked with xxx value, if xxx is equal to or greater than minlocktimeout value set in server.xml

    or

  • locked with minlocktimeout value specified in server.xml, if xxx is lower than minlocktimeout value set in server.xml.


Note –

Using CLI

To set lock expiry through CLI, execute the following command:


wadm> expire-lock  --user=admin --password-file=admin.pwd 
--host=serverhost--port=8989 --config=config1 --vs=config1 
--collection-uri=/dav1 --lock-uri=/dav1/file.html
--opaque-token=opaquelocktoken

See CLI Reference, expire-lock(1).

In the above example opaque-token specifies the ID of the lock that you want to set to expire.

To display existing locks through CLI, execute the following command:


wadm> list-locks --user=admin --password-file=admin.pwd --host=serverhost
--port=8989 --config=config1 --vs config1 --collection-uri=/dav1

See CLI Reference, list-locks(1).