Jian wrote:
>
> Hi Jason,
>
> thanks for the reply.
>
> My pylons basecontroller takes care of the session clean up
> like this:
>
> class BaseController(WSGIController):
>     def __call__(self, environ, start_response):
>         try:
>             return WSGIController.__call__(self, environ,
> start_response)
>         finally:
>             model.Session.remove()
>
> When I use model.Session.close(), everything works.
> But error comes whenever i change it to model.Session.remove().
> AFAIK, remove() make more sense than close() on a real site with
> dynamic load
> which is learned from SA docs.

I believe that remove() simply detaches the session from the 
current context, it doesn't explicitly close it out or release the 
bound connection for a transactional session.  Try closing before 
you remove.


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to sqlalchemy@googlegroups.com
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