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

Chris McDonough chrism at plope.com
Tue Jun 20 17:45:35 EDT 2006


On Jun 20, 2006, at 2:55 PM, William Heymann wrote:
> That is probably a good idea for long term to change things that  
> way and I
> would like to rewrite it. However right now I don't really want to  
> rewrite
> the way the current system works. I had hoped I could just use
> get_transaction().commit() almost immediately after seeing the data  
> from
> Verisign.

Sure, you can do this, although the new spelling is "import  
transaction; transaction.commit()".  I guess the only real problem  
with doing this is that you don't always know exactly what you're  
committing if you can't guarantee a fixed starting point as an  
invariant (e.g. if you kick off the method that does this *not* as a  
result of a request from Verisign).  It might also be a little  
confusing for Verisign to get an error response from your server  
sometimes but not other times even though you record the info  
regardless of the eventual response, but maybe they don't attempt to  
retry failed requests.

>
> I do like the idea of ClockServer though and I will probably start  
> playing
> with it soon to see how it will work for me. Does it work with zope  
> 2.9 also?

Yes.  It will ship with 2.10.

- C



More information about the Zope mailing list