Forums Register Login

Do you know a good Connection pooling utility

+Pie Number of slices to send: Send
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
+Pie Number of slices to send: Send
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 ]
+Pie Number of slices to send: Send
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 ?
+Pie Number of slices to send: Send
load?
+Pie Number of slices to send: Send
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 ?
Well THAT's new! Comfort me, reliable tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 1174 times.
Similar Threads
Transactions in Tomcat
Connection Pooling with Struts
Questions on EJB
Database Connection and Session
How do i get a connection object in a java class ; am using struts datasource
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 18:33:53.