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

Re: How can I lock a record using php-ldap?



Jon Roberts said:
> I've been considering this issue, and will probably be implementing a
> solution in my software (LDAPHttp) in the coming months as a "managed"
> identifier attribute type. I use Java servlets, not PHP, so I can take
> advantage of synchronization and memory residence. I would use a single
> process for creating new entries. This process would internally deduce
> and store the highest uidNumber (or whatever) in memory. Upon each new
> creation, a synchronized block of code would increment the highest
> uidNumber and return it, thereby avoiding race conditions.

As long as you are sure that all such transactions go exclusively through
your servlet... given that caveat, that's ok.  If that can't be
guaranteed, you're back to square one.

===========
Alan Sparks, UNIX/Linux Systems Administrator    <asparks@doublesparks.net>