Summary: | Connection pool, redeployment | ||
---|---|---|---|
Product: | Tomcat 5 | Reporter: | dima <cactus> |
Component: | Catalina | Assignee: | Tomcat Developers Mailing List <dev> |
Status: | RESOLVED DUPLICATE | ||
Severity: | normal | ||
Priority: | P3 | ||
Version: | 5.0.9 | ||
Target Milestone: | --- | ||
Hardware: | PC | ||
OS: | Windows XP |
Description
dima
2004-06-10 14:11:17 UTC
I have the same problem on Tomcat 5.0.28, WinXP and Oracle (different versions). Steps to reproduce: 1) set up a datasource under some specific context, setting parameter maxIdle to 1 or more 2) create an application (servlet) that uses the datasource to open (and close) a connection 3) run the servlet once 4) check that there is a connection created (e.g. by using Oracle query "select * from v$session") 5) reload the application (using Tomcat Manager or automatic reloading) 6) check that the connection is still open (e.g. by using Oracle query "select * from v$session") 7) run the servlet once 8) check that there is a NEW connection created (e.g. by using Oracle query "select * from v$session") Expected result: when reloading the application, the connection pool associated with its context should be closed and all its connections also closed (step 6). Remarks: 1) if on step 5 I restart Tomcat server instead of reloading one application, the connection pool's connections are closed as expected 2) if I set maxIdle to 0 when configuring the datasource (step 1), then connections are closed immediately when the application releases them. This indicates that the application closes the used connections correctly. See also: http://mail-archives.apache.org/mod_mbox/jakarta-commons-user/200307.mbox/%3CODENKBKODJNAIPLEPKHHKEAACDAA.mholly@talisentech.com%3E Can you guys test setting this <parameter> <name>removeAbandoned</name> <value>true</value> </parameter> in the Resource tag as explained here http://tomcat.apache.org/tomcat-5.0-doc/jndi-datasource-examples-howto.html Regards Vicky |