tomcat的连接池怎样设置超时时自动回收连接的时间?
谢谢.

解决方案 »

  1.   

    首先使用tomcat的数据库连接池,然后在此项配置中加入下面语句:
    <removeAbandoned="true">
    <removeAbandonedTimeout="60">note: The default timeout for removing abandoned connections is 300 seconds. 拿分来,
    不能耍赖啊 !!!!!!
      

  2.   

    在%Tomcat_Home%/conf/server.xml中
    <GlobalNamingResources>里的<ResourceParams name="***(JNDI)">的<parameter>标签配置
         <name>removeAbandoned</name>
          <!-- Abandoned DB connections are removed and recycled -->
         <value>true</value>