使用proxool报警告的问题

huangcaihua 2008-04-02 02:11:35
连接池使用的是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.

不知道是咋回事 请各位给看一下
...全文
102 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
huangcaihua 2008-04-02
  • 打赏
  • 举报
回复
还有就是 oracle会有好多进程被使用 为什么不能自动的关闭呢?!
huangcaihua 2008-04-02
  • 打赏
  • 举报
回复
网上有人说设置 maximum-active-time 我已经设置为20分钟了 结果还报 郁闷死了

81,092

社区成员

发帖
与我相关
我的任务
社区描述
Java Web 开发
社区管理员
  • Web 开发社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧