You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Manisha Sathe <ma...@yahoo.com> on 2005/01/24 10:25:41 UTC

connection Pool leaking - how to detect it ?

I just shifted to DataSource Connection pooling. I followed
 
http://jakarta.apache.org/tomcat/tomcat-5.0-doc/jndi-datasource-examples-howto.html
 
 
Here they have given 3 parameters to specify to control leaking  such as removeAbandoned, removeAbandonedTimeout, logAbandoned
 
1) Is there any way to detect in which program / connection, resultsets etc are not closed. I tried my best not to keep it open, but in case by mistake it happend to be then how i can detect it ?
 
2) Also what is the meaning of logAbandoned - where i can see the log of this ? 
 
 
regards
Manisha
 

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

RE: connection Pool leaking - how to detect it ?

Posted by Mike Curwen <g_...@globallyboundless.com>.
I use the logAbandonded in our test server, and I find the log messages in
catalina.out.  The log message includes (as part of a stack trace, so you
will have to inspect the output a bit) the JSP page or class (and line!) in
which the connection was opened.

Here's an example:

DBCP object created 2005-01-24 09:09:33 by the following code was never
closed:
java.lang.Exception
        at
org.apache.commons.dbcp.AbandonedTrace.init(AbandonedTrace.java:96)
        at
org.apache.commons.dbcp.AbandonedTrace.<init>(AbandonedTrace.java:79)
        at
org.apache.commons.dbcp.DelegatingResultSet.<init>(DelegatingResultSet.java:
71)
        at
org.apache.commons.dbcp.DelegatingResultSet.wrapResultSet(DelegatingResultSe
t.java:80)
        at
org.apache.commons.dbcp.DelegatingPreparedStatement.executeQuery(DelegatingP
reparedStatement.java:92)
        at
com.acme.security.DataSourceAuthenticator.getAuthenticatedUser(DataSourceAut
henticator.java:40)
        at
com.acme.security.SimpleLoginServlet.doPost(SimpleLoginServlet.java:76)



Mike Curwen


> -----Original Message-----
> From: Manisha Sathe [mailto:manisha_msathe@yahoo.com] 
> Sent: Monday, January 24, 2005 3:26 AM
> To: Tomcat Users List
> Subject: connection Pool leaking - how to detect it ?
> 
> 
> I just shifted to DataSource Connection pooling. I followed
>  
> http://jakarta.apache.org/tomcat/tomcat-5.0-doc/jndi-datasourc
e-examples-howto.html
 
 
Here they have given 3 parameters to specify to control leaking  such as
removeAbandoned, removeAbandonedTimeout, logAbandoned
 
1) Is there any way to detect in which program / connection, resultsets etc
are not closed. I tried my best not to keep it open, but in case by mistake
it happend to be then how i can detect it ?
 
2) Also what is the meaning of logAbandoned - where i can see the log of
this ? 
 
 
regards
Manisha
 

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 


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