[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
Locking an OpenLDAP directory for atomic operations
- To: openldap-software@OpenLDAP.org
- Subject: Locking an OpenLDAP directory for atomic operations
- From: Ali Safdar Kureishy <safdar.kureishy@gmail.com>
- Date: Mon, 29 Nov 2004 13:45:09 -0800
- Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:mime-version:content-type:content-transfer-encoding; b=eFTGP0Tsoyh6yyQuuiexJUmmR248+lWL2wHDEFqcg11st/2+L3wz3M7ydpDbKZBDTZPLEbLHowbhrI6yRNX6xLTweCyQWiDjnXsABmlRudE1eTECtGiNX3alGvv6LdUhlDWDWL3zELus8kU0yA6K9VHgV/AfNesz3PQlhUakta8=
Hi,
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
entry.
(http://www.openldap.org/lists/openldap-software/200009/msg00559.html)
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!
Safdar