the configuration you describe only defines parameters to be passed to the Connection Pool Library..which connection pool library are you using? are you using Thread starve algorithm? or explicit no-activity-on-connection algorithm? Most connection pools with close the connection only after statement handles are quiesced (explicit close) or starved for activity ? Martin ______________________________________________ Disclaimer and confidentiality note This message is confidential and may be privileged. If you are not the intended recipient, we kindly ask you to please inform the sender. Any unauthorised dissemination or copying hereof is prohibited. This message serves for information purposes only and shall not have any legally binding effect. Given that e-mails can easily be subject to manipulation, we can not accept any liability for the content provided.
> From: allen.ir...@smartintegration.com.au > To: users@tomcat.apache.org > Date: Tue, 31 Mar 2009 21:42:52 -0400 > Subject: Connection Pooling questions > > 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-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > _________________________________________________________________ Internet Explorer 8 – Get your Hotmail Accelerated. Download free! http://clk.atdmt.com/MRT/go/141323790/direct/01/