From: Wolfgang M. <wol...@ex...> - 2005-08-24 09:49:02
|
Hi, > From what I gather resource locking is handled in the > UserManagementService. The lockResource method appears to acquire a > write lock - how does one acquire a read lock on a resource? The lockResource method acquires a persistent exclusive-write lock on a document. The document will remain locked even if you stop and restart the database. Contrary to this, the locks that can be acquired through the XQuery functions util:shared-lock and util:exclusive-lock are shared-read/exclusive write locks (that reminds me that I still haven't fixed the util:shared-lock bug reported by Sjur). Persistent read locks are currently not supported, though this would be possible to implement. > Also can > I only lock one resource at a time or is it possible to lock multiple > resources (or perhaps a collection?) You can lock multiple resources by calling lockResource multiple times. Wolfgang |