On 02/08/2011 02:11, Bob DeRemer wrote:
> Hi Mark,
> 
> Actually, in the logs it does tell me that ExpandWar deleteDir
> failed.  This is because my "extensions" I have are actually JAR
> files that we're dynamically loaded so we don't have to restart the
> webapp.  I'm using the addUrl hack, but by casting the main webapp's
> Thread.currentThread().getContextClassLoader() to a URLClassLoader.
> From a dynamic loading standpoint, it works great!  It allows
> extension classes in an extension JAR to derive from classes in our
> built-in product JAR(s) loaded by the same [I'm assuming] webapp
> classloader.
> 
> The problem is, when I shutdown/undeploy the webapp, everything else
> gets deleted, but not the JAR(s) that are dynamically loaded.  Tomcat
> should not be holding on to these because I am NOT using the System
> class loader to load them.  Problem is, I'm not sure why these are
> not being unloaded.

You'll need to get a profiler to see what is holding on to references to
those JARs.

> Is there any way to force tomcat to release these?  I tried putting
> the antiJARLocking="true" in the main Context.xml as well as a local
> context.xml in META-INF and neither of these worked.

Without knowing what is holding on to the reference, it is pretty much
impossible to determine the best way to solve this problem.

Mark

> 
> Thanks in advance, Bob
> 
> -----Original Message----- From: Mark Thomas
> [mailto:ma...@apache.org] Sent: Monday, August 01, 2011 3:44 PM To:
> Tomcat Users List Subject: Re: HOW TO: re-deploy or undeploy a webapp
> when additional files are added after initial deployment
> 
> On 01/08/2011 20:32, Bob DeRemer wrote:
>> Thanks, but I need to do this in a production environment, where
>> we're deploying/re-deploying a WAR and there is no eclipse IDE.  In
>>  addition, I am dynamically adding extensions to our webapp without
>>  having to restart our webapp, which is what republishing from
>> Eclipse does.
> 
> Any messages in the logs? Tomcat 7 will report if it can't delete a
> file. I don't recall if Tomcat 6 does.
> 
> If a file is under the docBase and is not deleted it is because
> something (probably your app) still has the file open. You need to
> close the files before you redeploy.
> 
> Mark
> 
> ---------------------------------------------------------------------
>
> 
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
> 
> 
> ---------------------------------------------------------------------
>
> 
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to