今天在调试一个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.
分享到:
相关推荐
jar包,官方版本,自测可用
SEVERE: The web application [/xxx] registered the JDBC driver [org.logicalcobwebs.proxool.ProxoolDriver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the...
jar包,官方版本,自测可用
Invalid property 'houseKeepingSleepTime' of bean class [org.logicalcobwebs.proxool.ProxoolDataSource]: Bean property 'houseKeepingSleepTime' is not writable or has an invalid setter method. Does the ...
proxool.jar包,proxool连接池用到的两个jar包
proxool 数据库连接池用户名、密码加密处理,文件里面包含可直接使用加密的jar以及相关使用说明。
proxool数据库连接池jar2013-4月份的
有oracle连接池proxool 用到的jar 包 还有jdbc的驱动包 proxool的源码包 Java实现oracle proxool 单态的例子等
具体是对org.logicalcobwebs.proxool.admin.servlet.AdminServlet类。发现果然没有做response的字符设置。 在doGet(HttpServletRequest request, HttpServletResponse response)方法里加入了一句response....
<servlet-class >org.logicalcobwebs.proxool.configuration.ServletConfigurator </servlet-class > <init-param > <param-name >xmlFile </param-name > <param-value >WEB-INF/Proxool.xml </param-value > ...
方法是将org.logicalcobwebs.proxool.ProxoolDataSource 中houseKeepingSleepTime,maximumConnectionLifetime,recentlyStartedThreshold,recentlyStartedThreshold 中对应的set方法传入的类型从int改成long型。
<bean id="dataSource" class="org.logicalcobwebs.proxool.ProxoolDataSource" destroy-method="close"> <value>org.gjt.mm.mysql.Driver <value>jdbc:mysql://localhost/manytomany?useUnicode=true&...
1. ... 2 3 import java.io.File; 4 import java.io.InputStream; 5 import java.sql.Connection; 6 import java.sql.DriverManager;... 11 import org.logicalcobwebs.proxool.configuration.JAXPConfigur
在web开发中,可以利用hibernate配置数据源,但在实际的应用中,可能要连接多个数据源, 1.配置dataSource ... <value>org.logicalcobwebs.proxool.ProxoolDriver <property name=url>