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 ?