It's pretty trivial to write a middleware that does:

try:
your_app(environ, start_response)
commit()
except:
rollback()

but the ZopeTransactionExtension tries to avoid issuing a COMMIT statement 
if you did not alter any ORM objects during the transaction, while this TM 
might issue a commit when you use the database session for any reason 
(including looking up the groups for the logged in user).

If you let the transaction manager do all of the transaction management then 
the preponderance of your code doesn't have to care which middleware it is 
using.

Daniel

-- 
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en.

Reply via email to