sorry if this is a faq.

I want to use sqlalchemy in a Paste (wsgi) application.

For each web request, I need to begin a transaction, then either commit it or 
rollback depending on wether an exception occurred.

I want the begin / commit / rollback will be handled by some wsgi middleware.

Looking at the latest online docs, I'm assuming that "begin" is implicitely 
handled 
as needed by the engine.

And that if objectstore.commit() is not called, then the engine doesn't commit.

But then, neither will it rollback.. Right?

But depending on the concurency of the database, this may cause other clients 
to 
be blocked while they wait to see if I'm going to modify some data that has 
been 
read from some table.

So, should I use engine.begin() , objectstore.commit() + engine.commit() and 
engine.rollback() in the middleware instead?




-- 
Brad Clements,                [EMAIL PROTECTED]    (315)268-1000
http://www.murkworks.com                          
AOL-IM or SKYPE: BKClements




-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Sqlalchemy-users mailing list
Sqlalchemy-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sqlalchemy-users

Reply via email to