----- Original Message ----- From: "William Heymann" <[EMAIL PROTECTED]>
To: <zope@zope.org>
Sent: Tuesday, June 20, 2006 2:27 PM
Subject: [Zope] How to commit a piece of data in a transaction when thetransaction is being aborted later

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

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?

You could write the post data to a 'non-rollbackable' sql database, then any subsequent processing errors won't impact the data you have already written to the sql db.

Zope maillist  -  Zope@zope.org
**   No cross posts or HTML encoding!  **
(Related lists - http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope-dev )

Reply via email to