進入某個連接池配置頁,進入“連接“頁,點擊高級選項的”show“顯示高級選項。
指定 "測試頻率" 並啟用 "測試保留的連接"、"測試創建的連接" 和 "測試釋放的連接"。
測試頻率(Test Frequency): 60 秒
自動數據庫連接測試之間的秒數(0 - 32 位正整數)。測試失敗的連接將被關閉,然后重新打開以重新建立有效的物理數據庫連接。(必須在下面指定測試表名稱。)
The number of seconds (between 0 and a positive 32-bit integer) between automatic database connection tests. Connections that fail the test are closed and reopened to re-establish a valid physical database connection. (You must specify a Test Table Name below.)
測試保留的連接(Test Reserved Connections)
指定 WebLogic Server 是否在將連接提供給客戶端之前測試該連接。(必須在下面指定測試表名稱。)
Specifies whether WebLogic Server tests a connection before giving it to the client. (You must specify a Test Table Name below.)
測試創建的連接(Test Created Connections)
指定 WebLogic Server 是否在創建連接后且將該連接添加到緩沖池中可用連接列表之前對該連接進行測試。(必須指定測試表名稱。)
Specifies whether WebLogic Server tests a connection after creating it but before adding it to the list of connections available in the pool. (You must specify a Test Table Name.)
測試釋放的連接(Test Released Connections)
指定 WebLogic Server 是否在將連接返回到該 JDBC 連接緩沖池之前測試該連接。(必須指定測試表名稱。)
Specifies whether WebLogic Server tests a connection before returning it to this JDBC connection pool. (You must specify a Test Table Name.)
連接保留超時(Connection Reserve Timeout): 設為 30 秒
在保留緩沖池連接的調用超時之前的秒數(-1 - 32 位正整數)。如果設置為 -1,則調用永遠不會超時。
The number of seconds (between -1 and a positive 32-bit integer) after which a call to reserve a connection from the pool will timeout. When set to 0, a call will never timeout. When set to -1, a call will timeout immediately
重試創建連接的頻率(Connection Creation Retry Frequency): 設為 30 秒 嘗試建立與數據庫的連接的間隔秒數(0 - 32 位正整數)。適用於在數據庫不可用的情況下服務器啟動時創建的連接緩沖池。
The number of seconds (between 0 and a positive 32-bit integer) between attempts to establish connections to the database. Applies to connection pools created at server startup when the database is unavailable.
鈍化連接超時(Inactive Connection Timeout):
The number of inactive seconds on a reserved connection (between 0 and a positive 32-bit integer) before WebLogic Server reclaims the connection and releases it back into the connection pool.
服務器申請復議連接並且保留返回給連接池前的鈍化時間
測試表名稱(Test Table Name):
oracle的連接池默認為 SQL SELECT 1 FROM DUAL,sybase數據庫可以填入一個記錄不多的配置表名例如sys_code。
The name of the database table to use when testing physical database connections. This field is required when you specify a Test Frequency and enable Test Reserved Connections, Test Created Connections, and Test Released Connections.
其他相關的鏈接:
https://segmentfault.com/a/1190000002677439
http://blog.51cto.com/mrxiong/696017
http://www.blogjava.net/pdw2009/archive/2006/04/14/41152.html