The documentation says 'It’s sometimes advantageous to not use
SQLAlchemy’s thread-scoped sessions'. Thread-scoped as I understand is
done using scoped_session(), which will associate an SQLAlchemy
session for currently running thread.

WIth my experience from J2EE I understand that each request-response
is a separate thread, and assume thats the same for Pyramid ? If this
is true, whats the benefit of associating a new session in a custom
request object as in the documentation ?

http://docs.pylonsproject.org/projects/pyramid_cookbook/dev/sqla.html#using-a-non-global-session

I dont see a difference. Can someone please explain the difference ?
and which option to use when (with an example).

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

Reply via email to