commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Morgan Delagrange <mdela...@yahoo.com>
Subject Re: [PATCH] DBCP, tracking, reporting, and recovering abandoned connections
Date Thu, 16 May 2002 16:59:19 GMT
I'll take it on.  Somehow I didn't see your last post,
but this looks like good functionality.

--- Glenn Nielsen <glenn@voyager.apg.more.net> wrote:
> Is anyone interested in patches for DBCP?
> 
> Glenn Nielsen wrote:
> 
> > I have expanded upon the work James House did to
> generate stack
> > traces for abandoned db connections. (Thanks
> James)
> > 
> > The patch he provided was refactored and some new
> features added.
> > 
> > Three new DBCP parameters were added:
> > 
> > removeAbandoned - True or false. If true abandoned
> db connections
> > are removed after the removeAbandonedTimout is
> exceeded if the dbcp
> > is nearing exhaustion.
> > 
> > removeAbandonedTimeout - Time in seconds since a
> connection was last
> > used before it is considered abandoned.
> > 
> > logAbandoned - True or false.  If true Exception
> stack traces are
> > created so that the source of an abandoned db
> connection can be logged.
> > 
> > While reviewing the code I noticed that Statements
> and ResultSets were
> > not being closed when a Connection was closed
> (recycled).  This behaviour
> > differs from the JDBC spec which states that the
> underlying Statements
> > and ResultSets should be closed when a Connection
> is closed.  This 
> > patch tracks Statements and ResultSets so that
> when the Connection 
> > which created them is closed they are closed also.
> > 
> > This patch should be backward compatible with any
> code which uses
> > the existing DBCP.
> > 
> > I also have a patch to the Tomcat 4
> DbcpDataSourceFactory.java so
> > that it can use these new features.
> > 
> > I have been running Tomcat 4.1 with this new DBCP
> code on a production
> > system with 10-20k DBCP uses per day for the last
> three days and it
> > has worked well.
> > 
> > For me, this patch is critical for a production
> system. It ensures 
> > that Tomcat and the DBCP can recover from buggy
> applications which 
> > sometimes fail to return a db connection to the
> pool.  In addition
> > it can point the finger at the buggy application
> which failed to
> > return a connection to the pool.
> > 
> > I can post the patch to the list, or if someone
> wants to grant me
> > karma for jakarta-commons I can just commit it to
> CVS.
> > 
> > Regards,
> > 
> > Glenn
> > 
> >
>
----------------------------------------------------------------------
> > Glenn Nielsen             glenn@more.net | /*
> Spelin donut madder    |
> > MOREnet System Programming               |  * if
> iz ina coment.      |
> > Missouri Research and Education Network  |  */    
>                   |
> >
>
----------------------------------------------------------------------
> > 
> > --
> > To unsubscribe, e-mail:  
> <mailto:commons-dev-unsubscribe@jakarta.apache.org>
> > For additional commands, e-mail:
> <mailto:commons-dev-help@jakarta.apache.org>
> > 
> 
> 
> -- 
>
----------------------------------------------------------------------
> Glenn Nielsen             glenn@more.net | /* Spelin
> donut madder    |
> MOREnet System Programming               |  * if iz
> ina coment.      |
> Missouri Research and Education Network  |  */      
>                 |
>
----------------------------------------------------------------------
> 
> 
> --
> To unsubscribe, e-mail:  
> <mailto:commons-dev-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail:
> <mailto:commons-dev-help@jakarta.apache.org>
> 


=====
Morgan Delagrange
http://jakarta.apache.org/taglibs
http://jakarta.apache.org/commons
http://axion.tigris.org

__________________________________________________
Do You Yahoo!?
LAUNCH - Your Yahoo! Music Experience
http://launch.yahoo.com

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


Mime
View raw message