資料庫連線池1

2021-03-31 20:35:42 字數 1389 閱讀 9059

本人在學習hiber***時發現乙個不錯的連線池 : http://proxool.sourcefe.***/

配置方式如下:

chinaju.properties

jdbc-0.proxool.alias=chinaju

jdbc-0.proxool.driver-class=***.microsoft.jdbc.sqlserver.sqlserverdriver

jdbc-0.proxool.driver-url=jdbc:microsoft:sqlserver://192.168.0.113:1433;databasename=chinaju;user=sa;password=111

jdbc-0.proxool.maximum-connection-count=40

jdbc-0.proxool.prototype-count=4

jdbc-0.proxool.house-keeping-test-sql=select current_date

jdbc-0.proxool.verbose=true

jdbc-0.proxool.statistics=10s,1m,1d

jdbc-0.proxool.statistics-log-level=debug

放到 tomcat 站點的classees目錄下。就可以了,要吧放多個只要在web.xml指明就可以了。

servletconfigurator1

.logicalcobwebs.proxool.configuration.servletconfigurator

propertyfile

web-inf/classes/bbs.properties

1servletconfigurator2

.logicalcobwebs.proxool.configuration.servletconfigurator

propertyfile

web-inf/classes/chinaju.properties

1servletconfigurator3

.logicalcobwebs.proxool.configuration.servletconfigurator

propertyfile

web-inf/classes/count.properties

1admin

.logicalcobwebs.proxool.admin.servlet.adminservlet

使用方式如下:

conn = drivermanager.getconnection("proxool.chinaju");

stmt = conn.createstatement(resultset.type_scroll_sensitive, resultset.concur_updatable);

資料庫連線池 Redis連線池

基本原理 在內部物件池中,維護一定數量的資料庫連線,並對外暴露資料庫連線的獲取和返回方法。如外部使用者可通過getconnection方法獲取資料庫連線,使用完畢後再通過releaseconnection方法將連線返回,注意此時的連線並沒有關閉,而是由連線池管理器 並為下一次使用做好準備。2.作用 ...

資料庫連線池

實現資料連線池,讓系統有更高有執行效率 using system using system.data using system.data.sqlclient using system.collections using system.threading public class dataaccess...

資料庫連線池

資料庫連線池概述 資料庫連線是一種關鍵的有限的昂貴的資源,這一點在多使用者的網頁應用程式中體現得尤為突出。對資料庫連線的管理能顯著影響到整個應用程式的伸縮性和健壯性,影響到程式的效能指標。資料庫連線池正是針對這個問題提出來的。資料庫連線池負責分配 管理和釋放資料庫連線,它允許應用程式重複使用乙個現有...