tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "allen.irwin@smartintegration.com.au" <allen.ir...@smartintegration.com.au>
Subject Connection Pooling questions
Date Wed, 01 Apr 2009 01:42:52 GMT
Hello,

I searched on the mailing list back to 2007 and didn't see the answers I
needed for these DataSource related questions (though I did see similar,
not quite what I needed though).

I'm using Tomcat 5.5, Java 1.5 on Windows XP and have used the excellent
guide: http://tomcat.apache.org/tomcat-5.5-doc/jndi-resources-howto.html
for configuring the default data source within Tomcat

I configure it using the suggested /META-INF/context.xml with:
maxActive="30" maxIdle="10"

I assumed that maxActive would limit the total amount of DB
connections that could ever be open at one time (in this case 30).  Yet
from what I see it seems like I am limited to maxActive + maxIdle
connections open (in this case 40).  Is that true?

Also, the default behavior seems to be that the connections never close
within the pool when they are not being used.  I had my Tomcat server sit
there for about an hour idle with no client requests incoming and when I
ran netstat -a I still saw 39 connections open, they only closed when I
killed Tomcat.  Do I have to turn on some kind of cleanup explicitly?

I do close the connections within my program using conn.close(); as the
howto suggests. I thought that when the connections were not used that
they would over time be "really" closed and I would end up with the maxIdle
value
of 10 open connections within my Pool.

thanks! 

--------------------------------------------------------------------
mail2web.com – Enhanced email for the mobile individual based on Microsoft®
Exchange - http://link.mail2web.com/Personal/EnhancedEmail



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


Mime
View raw message