[Date Prev][Date Next] [Chronological] [Thread] [Top]

Locking an OpenLDAP directory for atomic operations


I have one client accessing my OpenLDAP server for read (and
potentially write) access while I have another client that
periodically triggers an LDIF import into the server using a
periodically generated LDIF file. I want to be able to lock the
directory for either operation so as to prevent any dirty reads by the
first client, or any overlapping writes by both.

I noticed a message posted here a long time ago about implementing a
locking mechanism using a test-and-set operation on some OpenLDAP

Since this is a pretty old post, I was wondering if there is a
programmatic way for me to achieve this in a simpler way now...

If not, is there such a test-and-set primitive available in OpenLDAP?
Can it be invoked using JNDI or JLDAP? (I didn't quite understand the
approach Kurt posted about the test-and-set operation in the link
above). Any details would be greatly appreciated. :)

Thanks in advance!