[Zope] How to commit a piece of data in a transaction when the transaction is being aborted later

William Heymann kosh at aesaeion.com
Tue Jun 20 14:27:59 EDT 2006


I am dealing with a zope system where Verisign is sending a POST to our server 
for ecommerece purposes. Currently I am writing the entire contents of the 
POST from verisign to the ZODB however I have a problem that some of these 
POSTs are not being recorded because an error occurs later in the 
transaction.

What I would like to do is isolate this recording from everything else. So 
that no matter what other error is raised that part will commit so I have a 
record of the conversation later.

Currently I can put the logging step as the very first step in the 
conversation with verisign and call get_transaction().commit() (I am 
currently using zope 2.7 and working on the migration to zope 2.9)

What would be the best way to deal with this problem? Should I just do a 
commit of the transaction as the very first step so that part is written and 
then zope will start a new transaction for the rest of the stuff done? Should 
I somehow tell zope to run a certain function as its own transaction? Also 
when I switch over to zope 2.9 how will these things need to be changed?

Thanks


More information about the Zope mailing list