Hi all:
I'm using only sqlalchemy sql expression language, and in documentation 
appears that transactions objects are not thread safe.. Need I to 
implement a decorator like this?

def transactional(fn):
     def transact(self, *args):
         c = self.engine.connect()
         lock.acquire()
         try:
             t = c.begin()
             fn(self, c, *args)
             t.commit()
         except Exception, e:
             t.rollback()
             raise
         finally:
             c.close()
             lock.release()
     transact.__name__ = fn.__name__

Can I use sessions without define object mappings, to use session thread 
local model, etc?

Thanks.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" 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/sqlalchemy?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to