commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stephen Westbom <swest...@yahoo.com>
Subject Re: [DBCP] Pool shut down when Tomcat context removed
Date Sat, 21 Jun 2003 13:36:03 GMT
Yes, make sure that the classes are loaded by the application's class loader,
not any of the server ones so that they go out of scope and are eligible for
garbage collection when you remove an application (or undeploy).

Follow this link to get a better understanding of applications and class
loaders in general within Tomcat.

http://jakarta.apache.org/tomcat/tomcat-4.1-doc/class-loader-howto.html

This means deploying the jar files for DBCP in the war file for the
application. Is this is really what you want to do (not share connections
between applications at the server level)?

Have fun

--- Tony Locke <tlocke@tlocke.org.uk> wrote:
> Hi,
> 
> I have a similar problem to that described in a previous post. I'm using
> DBCP as a JNDI datasource in Tomcat 4.1.24. As part of a test script I
> need to restore a database, but I can only do that once all the
> connections to the db are closed. I hoped that doing a 'remove' on the
> Tomcat web application would close down all the connections in the pool,
> but this doesn't seem to happen.
> 
> I configure the datasource in server.xml, but I've tried configuring it in
> webapps/<appname>.xml but to no avail.
> 
> Does anyone know how to make sure the connection pool closes all of its
> connections when the context is removed?
> 
> Thanks for your help,
> 
> Tony.
> 
> 
> ---------------------------------------------------------
> Tony Locke                          tlocke@tlocke.org.uk.
> ---------------------------------------------------------
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-user-help@jakarta.apache.org
> 


__________________________________
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com

Mime
View raw message