[sqlalchemy] Re: reusing or recreating engines

2008-06-17 Thread Martijn Faassen
Hey, Michael Bayer wrote: On Jun 17, 10:04 am, Martijn Faassen [EMAIL PROTECTED] wrote: Hi there, A question came up when thinking about how to integrate SQLAlchemy with Zope. Is it all right to recreate an engine, once per session scope (thread, say), or is it better to reuse the same

[sqlalchemy] Re: reusing or recreating engines

2008-06-17 Thread Michael Bayer
On Jun 17, 11:26 am, Martijn Faassen [EMAIL PROTECTED] wrote: We wouldn't recreate the engine on each request, just each time a session is constructed for a new thread (or actually new application/thread combination). (that is, ScopedSession would get a session_factory that did this).