Return-Path: X-Original-To: apmail-tomcat-users-archive@www.apache.org Delivered-To: apmail-tomcat-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id B222A693A for ; Tue, 2 Aug 2011 07:52:06 +0000 (UTC) Received: (qmail 52810 invoked by uid 500); 2 Aug 2011 07:52:00 -0000 Delivered-To: apmail-tomcat-users-archive@tomcat.apache.org Received: (qmail 52494 invoked by uid 500); 2 Aug 2011 07:51:41 -0000 Mailing-List: contact users-help@tomcat.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Tomcat Users List" Delivered-To: mailing list users@tomcat.apache.org Received: (qmail 52477 invoked by uid 99); 2 Aug 2011 07:51:37 -0000 Received: from minotaur.apache.org (HELO minotaur.apache.org) (140.211.11.9) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 02 Aug 2011 07:51:37 +0000 Received: from localhost (HELO [192.168.23.9]) (127.0.0.1) (smtp-auth username markt, mechanism plain) by minotaur.apache.org (qpsmtpd/0.29) with ESMTP; Tue, 02 Aug 2011 07:51:36 +0000 Message-ID: <4E37AC84.7030908@apache.org> Date: Tue, 02 Aug 2011 08:51:32 +0100 From: Mark Thomas User-Agent: Mozilla/5.0 (Windows NT 5.2; WOW64; rv:5.0) Gecko/20110624 Thunderbird/5.0 MIME-Version: 1.0 To: Tomcat Users List Subject: Re: HOW TO: re-deploy or undeploy a webapp when additional files are added after initial deployment References: <4E3701ED.6020809@apache.org> In-Reply-To: X-Enigmail-Version: 1.2 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit 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:markt@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-unsubscribe@tomcat.apache.org > For additional commands, e-mail: users-help@tomcat.apache.org > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org > For additional commands, e-mail: users-help@tomcat.apache.org > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org For additional commands, e-mail: users-help@tomcat.apache.org