[Zope-DB] Problems with transaction management and many database adapters

Dieter Maurer dieter at handshake.de
Thu Feb 5 13:29:58 EST 2004


M.-A. Lemburg wrote at 2004-2-4 22:37 +0100:
>Dieter Maurer wrote:
> ...
>> It is known:
>> 
>>   Transactions modified during error handling are not properly
>>   committed/aborted.
>> 
>> There has been a long discussion between Toby and me on "zope-dev".
>> 
>>   Toby convinced me that the abort should happen after
>>   error handling (and not before, as does the usual Zope code).
>> 
>> I fear, the problem is still present in all official Zope versions.
>
>Is there some way to work around this caveat ?

You can abort the transaction at the end of your "standard_error_message".

You will need an External Method, as "get_transaction" is not
available to TTW code.

The alternative is to put the "abort" in "ZPublisher.Publish.publish".
This, of course, implies a Zope modification.


I tried (in our private Zope installation) to do error handling
in the same transaction as the main thread (as Toby suggested).
But I failed due to a "get_transaction().begin()" at the begin of error
handling (this calls an implicite "abort").

-- 
Dieter



More information about the Zope-DB mailing list