How to control no. of JDBC Connections in Tomcat!!!
Joined: May 13, 2006
Dear friends, I want to know a way to configure/restrict no of JDBC connections that are available in a connectionpool which has been created programmatically thru my web application.Can we control this functionality through Tomcat in which my application is hosted.
You're already using DBCP!!! You should configure it through Tomcat and define it there!!!
Joined: Nov 29, 2005
Look at the javadoc for Apache's DBCP there is a method to set the maximum number of connections in the pool , that is the pool size.
As suggested by David O'Meara , Tomcat already has this feature and in case you configure the connection pool at Tomcal level then pool will be taken care by Tomcat and using JNDI you can make use of the connection pool from within your application.