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 06CE473F9 for ; Tue, 2 Aug 2011 01:12:40 +0000 (UTC) Received: (qmail 71620 invoked by uid 500); 2 Aug 2011 01:12:36 -0000 Delivered-To: apmail-tomcat-users-archive@tomcat.apache.org Received: (qmail 71270 invoked by uid 500); 2 Aug 2011 01:12:35 -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 71261 invoked by uid 99); 2 Aug 2011 01:12:35 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 02 Aug 2011 01:12:35 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=5.0 tests=RCVD_IN_DNSWL_NONE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [72.167.180.18] (HELO p3plex1out02.prod.phx3.secureserver.net) (72.167.180.18) by apache.org (qpsmtpd/0.29) with SMTP; Tue, 02 Aug 2011 01:12:27 +0000 Received: (qmail 31687 invoked from network); 2 Aug 2011 01:12:05 -0000 Received: from unknown (HELO smtp.ex1.secureserver.net) (72.167.180.20) by p3plex1out02.prod.phx3.secureserver.net with SMTP; 2 Aug 2011 01:12:05 -0000 Received: from P3PW5EX1MB14.EX1.SECURESERVER.NET ([10.6.135.87]) by P3PW5EX1HT002.EX1.SECURESERVER.NET ([72.167.180.20]) with mapi; Mon, 1 Aug 2011 18:12:05 -0700 From: Bob DeRemer To: Tomcat Users List Date: Mon, 1 Aug 2011 18:11:59 -0700 Subject: RE: HOW TO: re-deploy or undeploy a webapp when additional files are added after initial deployment Thread-Topic: HOW TO: re-deploy or undeploy a webapp when additional files are added after initial deployment Thread-Index: AcxQg1Vh9EyECpD0Tey5bedsHkw12gALNZUQ Message-ID: References: <4E3701ED.6020809@apache.org> In-Reply-To: <4E3701ED.6020809@apache.org> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Hi Mark, Actually, in the logs it does tell me that ExpandWar deleteDir failed. Thi= s is because my "extensions" I have are actually JAR files that we're dynam= ically 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().getContextCl= assLoader() to a URLClassLoader. From a dynamic loading standpoint, it wor= ks great! It allows extension classes in an extension JAR to derive from c= lasses in our built-in product JAR(s) loaded by the same [I'm assuming] web= app classloader.=20 The problem is, when I shutdown/undeploy the webapp, everything else gets d= eleted, 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 lo= ad them. Problem is, I'm not sure why these are not being unloaded. Is there any way to force tomcat to release these? I tried putting the ant= iJARLocking=3D"true" in the main Context.xml as well as a local context.xml= in META-INF and neither of these worked. Thanks in advance, Bob -----Original Message----- From: Mark Thomas [mailto:markt@apache.org]=20 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 a= re 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=20 > deploying/re-deploying a WAR and there is no eclipse IDE. In=20 > addition, I am dynamically adding extensions to our webapp without=20 > having to restart our webapp, which is what republishing from Eclipse=20 > 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 bef= ore 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