I've got a question about where to actually put the database connection code and when 
and where to call it.

Can a database pool be created as a variable within a module, i.e. within the 
__init__.py file of a particular webware context?  And, then each servlet would call 
pool.getConnection() in its awake method?  And should it do anything with that 
connection in .sleep()?

Is it bad to have a database connection sitting within a servlet's *class* attribute, 
or as a module variable within that servlet's .py file?

If I've got an orb (broker) handing out objects to various servlets, where should that 
orb be created?  In a module-level variable?  Should that orb get a connection from 
the pool just once when it starts up, or should it be getting a new one periodically?

Thanks for any help,
Tracy


-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Webware-discuss mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/webware-discuss

Reply via email to