-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Nicholas,
On 8/7/2009 4:39 PM, Nicholas Sushkin wrote: > On Friday 07 August 2009 10:53, Christopher Schultz wrote: > >> Recently, there was a post on the list regarding connection pool leakage >> from Tomcat (ref: >> http://www.nabble.com/Right-way-to-close-database-connection-pool-td24832 >> 197.html). > > This is the code I picked up from http://wiki.apache.org/tomcat/OutOfMemory a > while ago. > Invoke the method from your ContextListener.contextDestroyed(). Isn't it > enough? The code you posted is solving a different problem: when JDBC drivers loaded by a webapp are registered globally and therefore cause the webapp ClassLoader to hang around forever (including all java.lang.Class objects representing the classes loaded by the ClassLoader). The issue here is the leak an entire pooled JDBC DataSource including many Connection objects (as well as associated db-server resources to support those resources). De-registering the driver does not unload it from memory and would not cause the cleanup of these DataSource Connections. - -chris -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkp9tIMACgkQ9CaO5/Lv0PCNLACgtgqE5+5AOCwz4fOadvciEyI8 UCoAoI8o1GX+PbvRuH2+XWTcieL87nof =Mrzs -----END PGP SIGNATURE----- --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org