I found a nice connection pool when I learned Hibernet: http://proxool.sourceforge.net/
The configuration is as follows:
Chinaju.properties
jdbc-0.proxool.alias = chinajujdbc-0.proxool.driver-class = com.microsoft.jdbc.sqlserver.SQLServerDriverjdbc-0.proxool.driver-url = jdbc: microsoft: sqlserver: //192.168.0.113: 1433; DatabaseName = chinaju; user = sa; password = 111
JDBC-0.Proxool.maximum-connection-count = 40jdbc-0.Proxool.Prototype-count = 4
JDBC-0.Proxool.House-Keeping-Test-SQL = SELECT CURRENT_DATEJDBC-0.Proxool.verbose = truejdbc-0.Proxool.statistics = 10s, 1M, 1DJDBC-0.Proxool.statistics-log-level = debug
Put it in the Classees directory of the Tomcat site. It is ok, you have to put a number as long as it is in Web.xml.
The way of use is as follows:
CONN = DriverManager.getConnection ("proxool.chinaju"); stmt = conn.createstatement (ResultSet.Type_Scroll_Sensitive, ResultSet.concur_updatable);