[Zope] preventing transaction rollback

Tino Wildenhain tino at wildenhain.de
Sun Sep 19 11:16:16 EDT 2004


Hi,

Am So, den 19.09.2004 schrieb Jonathan Hobbs um 14:55:
> ...

> >
> > I thought that this try block with a commit() would isolate the send mail
> > code in its own transaction, and then catch any conflict exception and
> > ignore it. But I am still getting multiple emails per transaction when
> > multiple requests happen at the same time and conflicts occur.
> 
> An ugly solution:
> 
> Create a variable (property field) on a temporary folder (contents stored in
> memory).  When you send an email have the emailer routine load a unique
> identifier into the variable. In subsequent emails, check the contents of
> the variable before sending the email.
> 
> As I said, 'ugly', but it should work!

Sorry. No. It does not work. Temporary storage 
is bound to the same transaction machinerie
as all other zope storages.
This means your stored value is wiped out
when a transaction rollback is done. (in case of
a conflict error for example).

MailDropHost should be a solution as Andreas
said.

Regards
Tino



More information about the Zope mailing list