If the connection pool is exhausted, your application will wait indefinitely when it makes the request for the connection from pool.
Reference -
http://commons.apache.org/dbcp/apidocs/org/apache/commons/dbcp/BasicDataSource.html#maxWait
This is very dangerous. Somebody may ask connection from the pool in the code and may not release it. In that case, you will see your application has hanged and there are no exception in logs.
Best thing to do is to set the maxWait property.
<property name="maxWait">
<value>60000</value>
</property>
Now, if a
thread requests a connection and there is no free connection in the pool. application will throw - pool timeout exception after 1 minute ( as per config ). Once you can see the exception you can figure out something. If you application is using all the connection concurrently, you can increase the pool size a little bit. You can once again
test it and if the pool size is again exhausted. There is high probability somewhere in the code connections are not released. You need to fix it.