I could be wrong, it's been a while since I looked under the hood, but I 
recall module-level stuff being a factory for getting request-specific db 
connections.

That being said, two tangents...

1. I'm always been huge fan of doing everything with request-specific 
objects.  I've encountered a handful of libraries that have issues when 
their objects are used in a global context.   There is virtually no 
overhead in creating a connection object.

2. I've lately become a fan of lazy-loaded / memoized connections when 
they're (semi/possibly) expensive...  instead of attaching a dbConnection 
to request, I attach a proxy.  That proxy creates a dbConnection and adds a 
cleanup callback on first use; and returns the existing dbConnection on 
subsequent uses.  


-- 
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/pylons-discuss?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to