使用proxool报警告的问题
连接池使用的是proxool
获取连接
public static Connection getConnection()
{
Connection connection = null;
try
{
//DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
//connection = DriverManager.getConnection("jdbc:oracle:thin:@127.0.0.1:1521:china","excp","excp123");
Class.forName("org.logicalcobwebs.proxool.ProxoolDriver");
connection = DriverManager.getConnection("proxool.converse");
}
catch(Exception ex)
{
//ex.printStackTrace();
System.out.println(ex.getMessage());
}
return connection;
}
关闭连接
public static void releaseConnection(Connection connection)
{
try
{
if(connection != null && !connection.isClosed())
{
connection.close();
connection = null;
}
}
catch(Exception ex)
{
System.out.println(ex.getMessage());
}
}
每次操作数据都先 获取连接 操作之后在finally中关闭连接
配置文件如下:
<proxool>
<alias>converse</alias>
<driver-url>jdbc:oracle:thin:@127.0.0.1:1521:china</driver-url>
<driver-class>oracle.jdbc.driver.OracleDriver</driver-class>
<driver-properties>
<property name="user" value="***"/>
<property name="password" value="***"/>
</driver-properties>
<maximum-connection-lifetime>3600000</maximum-connection-lifetime>
<maximum-connection-count>100</maximum-connection-count>
<minimum-connection-count>10</minimum-connection-count>
<maximum-active-time>1200000</maximum-active-time>
<house-keeping-test-sql>select 1 from dual</house-keeping-test-sql>
</proxool>
结果系统运行一段时间后 会报很多的警告 如下:
2008-4-2 11:02:50 org.logicalcobwebs.proxool.HouseKeeper sweep
警告: #24070 was active for 3609564 milliseconds and has been removed automaticaly. The Thread responsible was named 'http-80-Processor1738', but the last SQL it performed is unknown because the trace property is not enabled.
2008-4-2 11:04:50 org.logicalcobwebs.proxool.HouseKeeper sweep
警告: #23343 was active for 3606514 milliseconds and has been removed automaticaly. The Thread responsible was named 'http-80-Processor1691', but the last SQL it performed is unknown because the trace property is not enabled.
2008-4-2 11:04:50 org.logicalcobwebs.proxool.HouseKeeper sweep
警告: #23380 was active for 3608093 milliseconds and has been removed automaticaly. The Thread responsible was named 'http-80-Processor1682', but the last SQL it performed is unknown because the trace property is not enabled.
不知道是咋回事 请各位给看一下