commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Juozas Baliuka" <>
Subject Re: [DBCP] Please let us start to improve the connection pool
Date Tue, 25 Mar 2003 17:07:16 GMT

I see I do not understand "abandoned connection" feature, it seems more like
antipattern than feature.
----- Original Message -----
From: "Mario Ivankovits" <>
To: "Jakarta Commons Developers List" <>
Sent: Tuesday, March 25, 2003 6:58 PM
Subject: Re: [DBCP] Please let us start to improve the connection pool

> > I use thread locals this way in web applications :
> >
> > MyServlet extends SomeServlet{
> ...cut ...
> 1) This helps you to access this connection on any place within your
> good. But if the pool gets back the connection the thread do not loose the
> instance of the pooled-connection, and so, it is possible, that two
> uses the same connection. This happens only if you use the abandoned
> configuration !!!
> 2) Sometimes it is needet to use two connections within one request. e.g.
> write to an log, to implement some numbercycle in the database. These have
> to be commited without affecting any other db transaction, and so a new
> connection is requested from the pool.
> We do also have a single point where we pass back the connections needet
> the main request, and all other connections like connections to write to
> db log, or the numbercycle are also capsuled very good.
> I know, the case were the pool might run into the abandoned connection
> situation are very rare.
> I think about this feature more like an "last exit" if an programmer has
> made an mistake, and it helps in debugging with the stacktrace.
> But to use these abandoned connection configuration in real life there are
> more other things todo, e.g. reset the idle time in certain situation e.g.
>, prev(), ...
> And maybe it is one of the "90% time spent in programming for 10% of the
> problems", so i have disabled this function in my configuration.
> As a consequence i vote for deprecate this feature to avoid this
> come up in the future again.
> Mario
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message