首先使用tomcat的数据库连接池,然后在此项配置中加入下面语句: <removeAbandoned="true"> <removeAbandonedTimeout="60">note: The default timeout for removing abandoned connections is 300 seconds. 拿分来, 不能耍赖啊 !!!!!!
在%Tomcat_Home%/conf/server.xml中 <GlobalNamingResources>里的<ResourceParams name="***(JNDI)">的<parameter>标签配置 <name>removeAbandoned</name> <!-- Abandoned DB connections are removed and recycled --> <value>true</value>
<removeAbandoned="true">
<removeAbandonedTimeout="60">note: The default timeout for removing abandoned connections is 300 seconds. 拿分来,
不能耍赖啊 !!!!!!
<GlobalNamingResources>里的<ResourceParams name="***(JNDI)">的<parameter>标签配置
<name>removeAbandoned</name>
<!-- Abandoned DB connections are removed and recycled -->
<value>true</value>