问题描述:
When the Oracle Database user was locked the JDBC connection will still active or destroy. The TestConnectionsOnReserve is false. What's the Weblogic JDBC Connection pool behaviors?
问题分析:
weblogic jdbc 连接池的行为依赖于相关参数配置,例如:TestConnectionsOnReserve
解决办法:
TestConnectionsOnReserve is false
If the Database user was locked,
When the weblogic server is starting, or to create new data source , or redeploy the data source , or to test connection, all the above will not success.
If the Database user was not locked,
When the weblogic server is starting, or to create new data source , or redeploy the data source , or to test connection, all the above will success.
If the JDBC data source is working, the initial connection count is 3, and the maximum connection count is 10, the current connection count is 7, When there is new request to get connection, It will fail because of the database user was locked.
Reference to https://docs.oracle.com/middleware/1212/wls/INTRO/jdbc.htm#INTRO215 , there is no any instruction about the above information.
For high availability, suggest to set TestConnectionsOnReserve = true
Also to use the JDBC new features , such as:
Understanding GridLink Data Sources
Understanding JDBC Multi Data Sources
浙公网安备 33010602011771号