commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Graham <grahamdavid1...@yahoo.com>
Subject Re: [DBCP] AbandonedTrace - Connection Recovery
Date Mon, 21 Jul 2003 15:40:14 GMT
> > I strongly disagree.  You getting paged due to someone's poor coding
> > abilities is outside the scope of DBCP.  There are much more effective
> > ways of preventing pages than by developing a library that covers up
> > coding mistakes so that they persist indefinitely.
> > 
> 
> So, what are these more effective ways to prevent pages?  

Not deploying code with resource leaks, training developers on proper
resource cleanup, calling developers responsible for the resource leak in
the middle of the night to help you fix the problem, etc.

> 
> The current dbcp code for detecting abandoned connections doesn't
> cover up the problem, it logs that there is a problem and correctly
> identifies the code responsible.
> 
> Yes, in a perfect world all code deployed would be thoroughly tested
> and bug free.  But I don't think that will happen in my lifeftime.  
> The servlet containers db connection pool is the best place to detect
> and correct this problem.

The individual apps causing the problems is the best place to correct the
problem.

> 
> Whether the code to do this is in the DBCP core or in sub classes
> doesn't matter to me.  Just as long as the ability to do this
> comes with the DBCP release.
> 
> Server availability is a very high priority for me.

Then don't deploy code that leaks resources.

> 
> > DBCP should be designed in a way that allows behaviors to be plugged
> in
> > which includes grabbing "abandoned" connections.  This should
> absolutely
> > not be shipped with DBCP because there is no reasonable way for it to
> know
> > what is abandoned in every situation.
> > 
> 
> Great, we agree that the core of DBCP should be designed so that this
> feature could be implemented in a subclass. :-)

Not necessarily in a subclass. That's one of the biggest flaws in the
current implementation.

> 
> You may feel that there is no reasonable way to know when a connection
> is abandoned. Fine, you don't have to use it, work on the code, document
> it, support it, etc.
> 
> That is not a good reason IMHO to prevent those who feel it is a very
> important feature from including a sub class which supports this with
> the DBCP release.

The fact that DBCP cannot reliably determine whether a connection has been
abandoned is a very good reason to not include that feature.  Only the
apps know how they will be using connections and consequently, only the
apps have enough information to determine when a connection is abandoned.

This discussion is old.  We already decided not to include this feature
with DBCP but compromised on a design that allows this behavior to be
plugged in and perhaps log possible leaks.

David

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


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

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