Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Do you know a good Connection pooling utility

 
Eric Chaber
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi folks,
any knowns a good Connection Pooling utility ?
I don't want to use Tomcat Datasource/JNDI setup (somehow it works on my windows platform but not on my RedHat linux, the JDNDI lookup always fails, if someone has this working well on linux, please post your server.xml/web.xml and connection class source).
Regards,
eRic
 
Dirk Schreckmann
Sheriff
Posts: 7023
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm using the DbConnectionBroker from JavaExchange.com for the first time, today. I don't yet know how "good" it is, but I can attest that it seems to be performing well, so far. I'm able to use it while pounding MySQL with a few thousand queries in just a few minutes, during testing.
[ May 08, 2004: Message edited by: Dirk Schreckmann ]
 
Eric Chaber
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks, I used Tomcat DBCP Common today and i have this error from time to time which is a nightmare for users
java.sql.SQLException: Server configuration denies access to data source at com.mysql.jdbc.MysqlIO.doHandshake(MysqlIO.java:537)
by the way whats is the load of your server with javaexchange pool ?
 
Dirk Schreckmann
Sheriff
Posts: 7023
 
Eric Chaber
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
doesn't matter ;-) I tested my setup with Jmeter, and i finally understood that setting removedabandon to true and to 1s free up my idle connections, I then have enough connections to serve my pages.
<Resource name="jdbc/mydbcp"
auth="Container"
type="javax.sql.DataSource"/>
<ResourceParams name="jdbc/mydbcp">
<parameter>
<name>factory</name>
<value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
</parameter>
<parameter>
<name>username</name>
<value>root</value>
</parameter>
<parameter>
<name>password</name>
<value></value>
</parameter>
<parameter>
<name>driverClassName</name>
<value>com.mysql.jdbc.Driver</value>
</parameter>
<parameter>
<name>url</name>
<value>jdbc:mysql://localhost/madb</value>
</parameter>
<parameter>
<name>maxActive</name>
<value>35</value>
</parameter>
<parameter>
<name>maxIdle</name>
<value>0</value>
</parameter>
<!-- Maximum time to wait for a dB connection to become available
in ms, in this example 10 seconds. An Exception is thrown if
this timeout is exceeded. Set to -1 to wait indefinitely.
-->
<parameter>
<name>maxWait</name>
<value>10000</value>
</parameter>
<parameter>
<name>removeAbandoned</name>
<value>true</value>
</parameter>
<!--Use the removeAbandonedTimeout parameter to set the number of seconds a dB connection has been idle before it is considered abandoned. -->
<parameter>
<name>removeAbandonedTimeout</name>
<value>1</value>
</parameter>
I'm surprised I have to set maxactive to a low number (35) while in my previous setup It was at 350.
The other question is there any side effects with removeAbandonedTimeout to 1 s ?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic