commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject Re: dbcp connections leaking and not being recovered
Date Thu, 24 Apr 2003 17:57:08 GMT
Fair enough it all stems from a load of stuff we built using Dreamweaver 
MX as a small micro-app on the side of a bigger app.  I can heartily 
recommend not using dreamweaver as it is utterly rubbish in terms of 
producing its own code.  It opens a new connectiion for every resultset on 
a page and does things in an absurd way; some of it is because it has to 
support the lowest possible types of driver but still!
Anyway thx

"Craig R. McClanahan" <>
24/04/2003 18:34
Please respond to "Jakarta Commons Users List"
        To:     Jakarta Commons Users List 
        Subject:        Re: dbcp connections leaking and not being 

On Thu, 24 Apr 2003 wrote:

> Date: Thu, 24 Apr 2003 17:20:43 +0100
> From:
> Reply-To: Jakarta Commons Users List <>
> To: Jakarta Commons Users List <>
> Subject: Re: dbcp connections leaking and not being recovered
> Yup I am trying to do this, however I cant trace where the leaks are
> coming from (and some of them are caused because I get a SQLException in
> the middle of a page and then it never runs the cleanUp stuff.
> Hmm, will just have to rewrite a load of stuff :(

That is why you should be using a "finally" block for the cleanup code.
This ensures that the cleanup is executed even if an SQLException is

I just posted a code design idiom in a previous message on this topic that
illustrates how to do this.

> Still doesnt answer however, why the DBCP does not recover abandonded
> connections after 30 seconds as I have specified in my server.xml?

Recovering abandoned connections was a bad idea in the first place, and
the DBCP code that implements it is being deprecated.  It is the
application's responsibility to avoid leaking connections.

> Pete


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

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message