[Zope-DB] working with zope rdbms transaction mgmt
M.-A. Lemburg
mal at egenix.com
Thu Jul 8 16:55:49 EDT 2004
Jim Abramson wrote:
> Thanks a lot for that advice, very helpful.
>
> And now for the finale:
>
> Is there a reliable way, somewhere within a series of statements during the request, to effectively commit the connection (without, of course, commit()!) i've seen 'select sysdate from dual' work at times, as a way of 'committing', but I don't know exactly how dependable this is, or what happens under the hood.
Believe me: you don't want to do that.
> and the converse is also interesting: is there any reasonable way to 'fool' the tx manager by...uh... letting an exception go up a few levels before trapping it?
Sure, but there's no trickery involved. You can create
as many errors as you like as long as Zope gets to finish
the request in a proper state (which then results in a call
to .commit() internally).
Good luck :-)
--
Marc-Andre Lemburg
eGenix.com
Professional Python Services directly from the Source (#1, Jul 08 2004)
>>> Python/Zope Consulting and Support ... http://www.egenix.com/
>>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/
>>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/
________________________________________________________________________
::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! ::::
More information about the Zope-DB
mailing list