[Product-Developers] Feedback about LDAP

Jean-Michel FRANCOIS jeanmichel.francois at makina-corpus.com
Wed May 27 14:57:02 UTC 2009


Wichert Akkerman a écrit :
> Previously Jean-Michel FRANCOIS wrote:
>   
>> Wichert Akkerman a écrit :
>>     
>>> Previously Jean-Michel FRANCOIS wrote:
>>>   
>>>       
>>>> I need to know how you are using OpenLDAP with the Zope transaction
>>>> manager. Because OpenLDAP has no transaction, How do you abort Zope
>>>> transaction ? RDBMS  are well integrated in the zope transaction, but i
>>>> don't find anything on the same for OpenLDAP.
>>>>     
>>>>         
>>> LDAP operations in Plone are not transaction aware. If you want to do
>>> that you would have to queue any writes and commit them when the
>>> transaction is being commited. I haven't looked into it, but I suspect
>>> it will not be too difficult to implement.
>>>
>>> Wichert.
>>>
>>>   
>>>       
>> Thank you Wichert for your answer.
>>
>> The only transaction manager code i have red was from MaildropHost. It
>> doesn't seems too difficult except in one use case for OpenLDAP:
>>
>> Transaction Start
>> Adding some entries in the ldap
>> Query entries
>> End of the transaction
>>
>> You will not have entries as result of your query because they are not
>> already register.
>>     
>
> That's true. I suspect that most of the time that does not matter since
> you rarely need to query for values you change in the same request. In
> cases where you do you can usually implement a workaround by breaking
> the operation in two steps and commiting the transaction in between,
> either manually or by invoking a new request with a HTTP redirect.
>
> Wichert.
>
>   
That's true. Thank you for your help Wichert. I will try to make this in
a reusable egg.

-- 
Cordialement,
Jean-Michel FRANCOIS
Makina-Corpus






More information about the Product-Developers mailing list