The problem is that we're indeed trying not to waste database resources because the db is used by many applications (java, c++, perl etc). So we'd like to reserve only as many connections as really needed, possibly with couple extra connections "just in case"
> If the connection pool is full and no apps are using the pool, I believe > you are correct that the connections will be wasted. Are you wanting to > free up connections to be used with other applications that are not > getting connections from the pool? If so, the pool design will not work > for you. The only quick fix I can think of is to have additional thread/servlet in our application which would run permanently, periodically request number of unused connections via DBConnection.getPool().getNbrAvailable() and when this number exceeds some threshold, it would call TurbineDB.getConnection/releaseConnection appropriate number of times to get rid of expired connections. > If you are getting all connections throught the pool, I do not > see why it matters how many connections are in the pool waiting to be > used. Are you trying to minimize overall resource usage? yes that's the point and one of the reasons we're adding db connection pooling to the application > I usually set the expiration at around 1 day, but you can probably set > it higher, how long do you want them to live? I'd rather had this thing flexible so that a connection would live as long as it's needed plus some extra configurable "expiration" time. That way the connection wouldn't be closed just because it's too old even if some code is ready to use it. thanks and best regards, Alexander Vorobiev ps. sorry for the long passage my employer adds to emails --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
