I like Jeff's idea re multiple data sources.
Here's a patch to WebKit/Application.py to do that:
*** o/Application.py Tue Oct 23 17:49:44 2001
--- ./Application.py Wed Oct 24 15:26:26 2001
***************
*** 101,106 ****
--- 101,107 ----
self._serverSideInfoCacheByPath = {}
self._cacheDictLock = Lock()
self._instanceCacheSize = self._server.setting('MaxServerThreads')
+ self._dbPools = {}
self._canDirs = []
self.initializeCans()
***************
*** 237,242 ****
--- 238,245 ----
del self._factoryList
del self._server
del self._servletCacheByPath
+ for p in self._dbPools.values():
+ p.shutDown()
print "Application has been succesfully shutdown."
***************
*** 1186,1191 ****
--- 1189,1206 ----
return ssPath, urlPath, extraURLPath
+ def getDbConnection(self, dsn='default'):
+ if not self._dbPools.has_key(dsn):
+ from MiscUtils.DBPool import DBPool
+ source = self.setting('dataSources')[dsn]
+ self._dbPools[dsn] = DBPool(
+ # our DB-API v2.0 module:
+ __import__(source['DbModule']),
+ # number of concurrent connections:
+ source['DbConnections'],
+ # DB module connection string:
+ source['DbConnect'])
+ return self._dbPools[dsn].getConnection() # may block
## Deprecated ##
_______________________________________________
Webware-discuss mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/webware-discuss