I have a Spring application deployed in JBoss EAP server, using the following settings:
<bean:bean id="userDataSource" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close">
<bean:property name="driverClassName" value="oracle.jdbc.driver.OracleDriver"/>
<bean:property name="url" value="jdbc:oracle:thin:@10.8.1.5:1521:DB"/>
<bean:property name="username" value="WEBDB"/>
<bean:property name="password" value="WEBDB"/>
</bean:bean>
How do I configure the connection pool's min and max size?
Any references or any best practices for BasicDataSource will be of great help.
You could add to your userDataSource the appropriate properties, for example:
<bean:property name="initialSize" value="1" />
<bean:property name="maxActive" value="5" />
<bean:property name="maxIdle" value="2" />
See https://commons.apache.org/proper/commons-dbcp/configuration.html for reference.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With