[Zope-DB] Problems with transaction management and many database adapters

M.-A. Lemburg mal at egenix.com
Wed Feb 4 05:26:36 EST 2004

Marco Bizzarri wrote:
> First of all, thanks for your reply. After a few research, we discover 
> the problem caused by our example. As you may remember, there was a page 
> template, using a dtml (standard_html_header), calling a PT 
> (menu_headers), calling a SQLMethod.
> As you can see running the example and getting a look at the logs, 
> viewing the PT index_html causes two transactions to be opened: the 
> first one ends with a commit, the second one remains open (no commit or 
> rollback), which is strange since every zope transaction 
> (request/respose) should be the boundary also of a database transaction 
> (either begin/commit or begin/rollback).
> The problem is in the paflow.js javascript file, which is in the 
> standard_html_header. The browser, behind the scene, after getting the 
> index_html, tries to get the paflow.js. However, since this is not 
> present, it raises a resource not found error, and sends back to the 
> browser an error page (which is not shown to the user, since this error 
> is silently captured by the browser). The error produces a 
> standard_error_message page, which, by default, includes the 
> standard_html_header, which calls the menu_html which calls the SQL 
> Method (oh gawd!). Here is either the feature or the strange behaviour: 
> this is the second transaction which is not closed (no commit/rollback 
> at the end). Is this a known behaviour? Or is there something we are 
> missing?

Hmm, sounds like something is going wrong in Zope for the special case
of error handling.

Marc-Andre Lemburg

Professional Python Services directly from the Source  (#1, Feb 03 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/
2004-01-23: Released mxODBC.Zope.DA 1.0.8        http://zope.egenix.com/

::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! ::::

More information about the Zope-DB mailing list