[org.logicalcobwebs.proxool.OraclePool]...milliseconds and has been removed automaticaly

今天在调试一个transaction时,由于transaction中包含很多判断及sql,

在调试时,系统报错如下:

2011-10-04 16:59:52,718 [org.logicalcobwebs.proxool.OraclePool]-[WARN] #0065 was active for 334672 milliseconds and has been removed automaticaly. The Thread responsible was named 'http-8000-2', but the last SQL it performed is unknown because the trace property is not enabled.

显然,transaction还没执行完,session就关闭了,而且是被proxool连接池自动关闭的,并且不会重建。。

查了下网,那就定一下session的连接时间吧:

在<bean id="dataSource"...>中,定义如下:

<property name="maximumActiveTime" value="${db.maximumActiveTime}"></property>


其中:

具体的定义样式和proxool的版本有关,我这里是0.9.1.

db.maximumActiveTime = 600000

单位为毫秒。

具体参见:

http://proxool.sourceforge.net/properties.html

maximum-active-time:
If the housekeeper comes across a thread that has been active for longer than this then it will kill it. So make sure you set this to a number bigger than your slowest expected response! Default is 5 minutes.

你可能感兴趣的:(proxool)