AW: [Zope-DB] transactions
Martin Gebert
Murphy.Gebert@gmx.de
Sat, 18 Jan 2003 13:10:42 +0100
> Ok,thank you,your help brought me on the wright way.
> I can't use the automatic mechanism of the TM because i don't
> invoke zPublisher. I have to call ZSQL-Methods from an external method
> that never (except i want it) returns do Zope with a RESPONSE.
> So i read the HowTo "Use ZODB Transactions" and followed the
> example to obtain a transaction object. Using that Execption-Object
> i will be able to control the transaction of the ZSQL-Method.
>
> def foo(self):
> try:
> tmo=get_transaction()
> self.ZSQLMethod()
> except:
> tmo.abort()
> tmo.commit()
>
>
> Ralph
That's an interesting How-To; I didn't know it yet. Still I'm not sure about the possibilities of manual TA handling; do you think it could be a solution to the following problem?
http://lists.zope.org/pipermail/zope-db/2002-October/000950.html
Martin