Spyce and SQL Alchemy Questions

Bruce Webber <[email protected]>
Newsgroups gmane.comp.python.spyce.general
Message-ID <90FEC64E468447D85738EE97@[10.9.30.130]>
I created a small Spyce application for my team to enter project 
information into an SQLite database. I'm using SQL Alchemy to manage the 
database.

Spyce is installed on a Windows 2000 Server running Apache. Spyce is 
running as a webserver and I'm using Apache's mod_proxy and mod_redirect so 
that requests for .spy pages are passed to Spyce on port 8000.

This all seems to work fine, and I really like SQL Alchemy.

When I create an SQL Alchemy engine, session, metadata and mapping objects, 
these objects persist even after the Spyce page completes. To avoid 
attempting to recreate these objects (which results in an error), I'm using 
the Spyce pool module to store a "flag" which tells if the objects have 
been created.

Is this the expected behavior? I like it (I expect it improves 
performance)but I'd like to understand it better, as I did not explicitly 
place the SQL Alchemy objects in the pool to be retained.

Also, it occurs to me that I should create an SQL Alchemy session object 
for each Spyce page (closing it at the bottom of the page), so that users 
do not share the same database session. Does this make sense?

-- 
Bruce Webber
[email protected]
http://brucewebber.us
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.