On Apr 13, 2007, at 10:49 AM, Arun Kumar PG wrote:

> Hi All,
>
> I have a web application where I have multiple DAOs that may be  
> called during phases within a request. Since I want to make sure  
> that I get the same session with every DAO I was wondering if I can  
> add a runtime session attribute to the current thread returned  
> Python's threading.currentThread() as soon as a request hits the  
> application.
>

absolutely.  or if youre on python 2.4, threading.local() is easier.

> I will be happy if someone can share approach for using  
> SessionContext in case of a web application so that every request  
> is associated with the same session/

thats what it does, you can check the docs / read the source or maybe  
someone will have some more detail about how they use it (its also  
used in Pylons by default).


--~--~---------~--~----~------------~-------~--~----~
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