SECTION 03 通过 ProxoolDriver 取得 connection
建立一个 jsp or DAO Bean, 通过 org.logicalcobwebs.proxool.ProxoolDriver 建立 Connection test.jsp SECTION 04 检视 pooling 现在状态
执行 http://localhost:8080/proxool-test/admin ( proxool-test 是你的应用名称 ) 如果没有任何 pool 状态的时候, 你只会看到 Pools 这几个字, 所以你先执行 http://localhost:8080/proxool-test/test.jsp 建立一个 connection, 就可以监控 connection pooling 的状态了. Pools
> test
-> jdbc:mysql://www:3306/test Defintition for test
URL
jdbc:mysql://localhost:3306/test
Driver
org.gjt.mm.mysql.Driver
Connections
0 (min), 15 (max)
Prototyping
off
Connection Lifetime
11:00:00
Maximum active time
07:05:00
House keeping sleep time
30s
House keeping test SQL
off
Fatal SQL exceptions
off
Statistics
off Snapshot at 21:12:53
Start date
01-??-2003 21:12:30
Connections
1 (active), 0 (available), 15 (max)
Served
1
Refused
0
Details
#
born
last
start
lap
(ms)
thread 1
21:12:31
21:12:31
22432
Thread-15 less information
Proxool 0.7.2 (29-Apr-2003 00:33) SECTION 05 使用 properties 或者 xml 来设置 DB URL 及 Driver
可以采用 xml 配置文件, 在程序中使用 JAXPConfigurator.configure("proxool.xml", false); 配置文件设置如下 WEB-INF/proxool.xml