commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Juozas Baliuka" <bali...@mwm.lt>
Subject Re: DBCP status?
Date Mon, 30 Jun 2003 12:20:05 GMT

It is possible to detect "abandoned" connection with Thread.isAlive() (if
thread pool is not used or maxConnections >= maxThreads),
 but it is not a good way for performance ( iterate "owners" and chech
"isAlive" )





----- Original Message -----
From: "Danny Angus" <danny@apache.org>
To: "Jakarta Commons Developers List" <commons-dev@jakarta.apache.org>
Sent: Monday, June 30, 2003 12:47 PM
Subject: RE: DBCP status?


> I think we've had this discussion before.
>
> But I'll weigh in with my 2c again because I still feel strongly about
it..
>
> Craig says:
>
> > 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.  And, grabbing back
> > connections that are actually in use is *much* worse than leaking them,
> > because you immediately break an application that is currenty executing,
> > in ways that are very unpredictable, hard to reproduce, and basically
> > impossible to recover from.
>
>
> I agree.
>
> IMO It is fundamentally better to let leaks result in the problems
associated with leaks (run out of connections) than to replace a set of
known, quantifiable and understood symptoms with Mystery and Confusion.
>
> d.
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message