Nice. Ok. I manually modified Ken's patch to add getDbConnInfo(). This way I can provide for dynamically generated connection information via...
self.application.getDbConnInfo = myDbConnInfo Clark *** 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 getDbConnInfo(self,dsn): + return self.setting('dataSources')[dsn] + + def getDbConnection(self, dsn='default'): + if not self._dbPools.has_key(dsn): + from MiscUtils.DBPool import DBPool + source = self.getDbConnInfo(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 ----- End forwarded message ----- _______________________________________________ Webware-discuss mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/webware-discuss