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.  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?

[EMAIL PROTECTED] wrote:
> 
> Hi
> 
> I'm trying to use Turbine database connection pool in my Tomcat-based
> application. So far it works ok
> but I have several questions regarding the pool design. My main concern is
> connection expiration algorithm.
> As far as I understand from the source code expired/not-expired condition
> is only checked when the connection
> is being returned back to the pool. But that means that if the web
> application has big number of users accessing
> it at some moment, it's going to establish many connections. And if later
> (but before expiration time is up)
> the number of users drops (end of day) then majority of the connections
> won't be closed until somebody
> starts (actively!) using the application again.
> 
> The more desirable behavior would be to have separate thread monitoring
> unused connections periodically
> and closing them upon expiration. Is something like this planned for future
> releases? Or please correct me
> if I'm wrong.
> 
> Another question is why the expiration time starts counting starting from a
> connection creation and not from
> the moment it's returned to the pool. What's wrong with long living
> connections?
> 

I usually set the expiration at around 1 day, but you can probably set
it higher, how long do you want them to live?

john mcnally

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to