RE: [Webware-devel] Webware and Database Connection Pooling

2005-07-26 Thread Warren Smith
Geoffrey Talvola said: > Christoph Zwerschke wrote: >> > import threading >> > t = threading.currentThread() >> > Then you can get and set arbitrary attributes on that >> > thread to achieve thread-local storage. So a simple >> > implementation of a function that gets a thread-local >> > con

RE: [Webware-devel] Webware and Database Connection Pooling

2005-07-26 Thread Geoffrey Talvola
Christoph Zwerschke wrote: > > import threading > > t = threading.currentThread() > > Then you can get and set arbitrary attributes on that > > thread to achieve thread-local storage. So a simple > > implementation of a function that gets a thread-local > > connection could look like this: >

Re: [Webware-devel] Webware and Database Connection Pooling

2005-07-26 Thread Christoph Zwerschke
> import threading > t = threading.currentThread() > Then you can get and set arbitrary attributes on that > thread to achieve thread-local storage. So a simple > implementation of a function that gets a thread-local > connection could look like this: > ... Thanks, that looks quite reasonable an

Re: [Webware-devel] Webware and Database Connection Pooling

2005-07-26 Thread Christoph Zwerschke
Warren, thanks for the quick reply. I think we should proceed as follows: 1) The MiscUtils/DBPool.py should be kept as it is, but it should be a little bit better documented. The advantage of DBPool will be that the code is very easy to understand. So it may serve as a “starting point” for pe

RE: [Webware-devel] Webware and Database Connection Pooling

2005-07-26 Thread Geoffrey Talvola
Christoph Zwerschke said: > * My last important question: Maybe I understand something wrong, >but if I use DBPool for WebKit servlets, i.e. with the >ThreadedAppServer, wouldn't it be much more reasonable to >automatically bind the connections 1:1 to the servlet threads >created by

Re: [Webware-devel] Webware and Database Connection Pooling

2005-07-26 Thread Warren Smith
Christoph Zwerschke said: > I haven’t checked out DbConnectionPool yet. Which status has it? > Warren, are you still working on it? Are you/somebody else interested > in improving/testing this module and getting it into Webware, e.g. > MiscUtils? If yes, I’d like to contribute if I can. > I haven'

[Webware-devel] Webware and Database Connection Pooling

2005-07-25 Thread Christoph Zwerschke
Hi all, I’m just experimenting with WebKit and database connection pooling, and some questions/suggestions came up which I hope can be answered here: As far as I understand I have to use either MiscUtils/DBPool.py which is pretty simple, or (as I noticed just now by searching the archives) a m