Victor Safronovich wrote at 2005-9-21 17:19 +0600:
> ...
>I   used  a  MailHost  product  for  e-mail notifications, but it sends mails 
>at
>runtime. And when there are errors in transaction, objects have been created 
>and its not
>commited, but users received mails.
>
>I  think i must use an after commit hook, but transactions not supported such
>hooks.

Do you not want to send the email and make the SQL/ZODB modification
in the *SAME* transaction?

Your approach would send the email after the transaction.
When the sending failed, your transaction were committed nevertheless.

Jens made a transaction aware mailhost. I think, its name
is "MailDropHost". It opens a connection to the mail server,
lets it check all of the message (and reports any problems)
but delays the final "commit" until the transaction is committed.

As an additional advantage, this could already be implemented
with ancient ZODB versions -- it does not need any extensions.


-- 
Dieter
_______________________________________________
For more information about ZODB, see the ZODB Wiki:
http://www.zope.org/Wikis/ZODB/

ZODB-Dev mailing list  -  ZODB-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zodb-dev

Reply via email to