tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "" <>
Subject RE: Connection Pooling questions
Date Wed, 01 Apr 2009 03:05:21 GMT

Thanks for your reply Martin.  Your response kind of lost me though. I used
the howto guide at which
mentions the default Data Source (dbcp I believe).  But mentioned nothing
about the algorithms you said.

Original Message:
From: Martin Gainty
Date: Tue, 31 Mar 2009 22:33:36 -0400
Subject: RE: Connection Pooling questions

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
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:
> To:
> 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:
> 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
> value
> of 10 open connections within my Pool.
> thanks! 
> --------------------------------------------------------------------
> – Enhanced email for the mobile individual based on
> Exchange -
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

Internet Explorer 8 – Get your Hotmail Accelerated.  Download free!

-------------------------------------------------------------------- - Microsoft® Exchange solutions from a leading provider -

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message