--- "Noel J. Bergman" <[EMAIL PROTECTED]> wrote:
> > I do not believe there is any fundamentally sound algorithm that a
> > connection pool can use to detect when a connection has truly been
> > "abandoned" and is thereby suitable for recovery.
> 
> If we did not have a pool, the server would eventually (a) run out of
> connections, possibly impacting other applications in the system and/or
> (b)
> timeout excessively old connections.  Those timeouts are generally very
> long.  The default in MySQL is 8 hours.

This configuration is well beyond the scope of DBCP.

> 
> The question to ask is the purpose of a connection pool.  If it is to
> improve performance, then it has a set of jobs.  Changing the
> characteristics of the preceeding paragraph are not included in that set
> of
> jobs.

Performance improvement is the main reason to use pooling.

> 
> Where people want a connection pool to recover abandoned connections,
> that
> usually points to either poor programming within a particular
> application,
> or sharing by multiple application components, one of which may have a
> problem.  Essentially, they want to shorten the server timeout, so that
> other components can't deny service by losing track of connections.
>
> Do you concur with this analysis?

That is most likely why people want DBCP to recover connections but again
this is beyond the scope of DBCP.  Fixing the applications to manage their
resources appropriately is the solution in this case.

David

> 
> > It's really sad that people writing database driven software using a
> > connection pool don't seem to be aware of how trivially simple it is
> to
> > make sure that connection leaks do not happen to them, using a
> > try/catch/finally block to ensure that the release always happens.
> 
> I agree.  The code that I use is even more that what you posted, so much
> so
> that it led me to develop a functor-type approach for our internal use,
> where I provide the normative database operation(s) that we want
> performed,
> and the core library manages the rest.
> 
>       --- Noel
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 


__________________________________
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com

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

Reply via email to