commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stephen Westbom <>
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.

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 <> 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                
> ---------------------------------------------------------
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!

View raw message