Database connection pool 1

xiaoxiao2021-03-05  23

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.

ServletConfigurator1 org.logicalcobwebs.proxool.configuration.ServletConfigurator propertyFile Web-inf / class / bbs.properties 1 ServletConfigurator2 org.logicalcobwebs.proxool.configuration.ServletConfigurator >>> Web-inf / class / chinaju.properties 1 < servlet-name> ServletConfigurator3 org.logicalcobwebs.proxool.configuration.ServletConfigurator >>> < -Value> Web-inf / class / count.properties 1 admin org.logicalCobwebs.Proxool.admin.servlet.adminservlet admin / admin

The way of use is as follows:

CONN = DriverManager.getConnection ("proxool.chinaju"); stmt = conn.createstatement (ResultSet.Type_Scroll_Sensitive, ResultSet.concur_updatable);

转载请注明原文地址:https://www.9cbs.com/read-35061.html

New Post(0)