Return-Path: Delivered-To: apmail-tomcat-users-archive@www.apache.org Received: (qmail 12939 invoked from network); 20 Aug 2010 14:03:26 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 20 Aug 2010 14:03:26 -0000 Received: (qmail 93229 invoked by uid 500); 20 Aug 2010 14:03:23 -0000 Delivered-To: apmail-tomcat-users-archive@tomcat.apache.org Received: (qmail 93012 invoked by uid 500); 20 Aug 2010 14:03:19 -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 93003 invoked by uid 99); 20 Aug 2010 14:03:18 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 20 Aug 2010 14:03:18 +0000 X-ASF-Spam-Status: No, hits=2.2 required=10.0 tests=FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of seanmce33@gmail.com designates 209.85.215.173 as permitted sender) Received: from [209.85.215.173] (HELO mail-ey0-f173.google.com) (209.85.215.173) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 20 Aug 2010 14:03:13 +0000 Received: by eyf18 with SMTP id 18so2612258eyf.18 for ; Fri, 20 Aug 2010 07:02:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:mime-version:received:in-reply-to :references:from:date:message-id:subject:to:content-type :content-transfer-encoding; bh=Q5J64Mcq5SAHX38eeFqFo6seHpvDPpN7D5JPEstjj6c=; b=is29cLBB/758WjYLdTTfIFWE35dZk04QREekVe3/xOwwSlhmTcyh7LPIm2Bv1F4ajG vwFnuSN7e9UzDyq0LrzbzytI2ctFUO8tG/OG/u19pqJWAwViqVfI3nZUnD5/4Tvein6x ytnTtaVp3IZMo9wbJM/qegVtssFpyzGFa1p+Y= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type:content-transfer-encoding; b=jdpk+aSmHnHVwRObZm+PxW0R65ywHeo3SHxxhkkYuf972qYCjbIO7HDNJ0SjRhNd+n IpCp8/XQLSNlO4jd0u09qX4d2an+8BYOxym/Fm0bHnNm0Yfm0hfYQb4d2yq0Iwqp6wYV gvWNfh4fp6myJlp2s0S7g6h/5nDQpCqN1rquk= Received: by 10.213.97.129 with SMTP id l1mr348110ebn.56.1282312972282; Fri, 20 Aug 2010 07:02:52 -0700 (PDT) MIME-Version: 1.0 Received: by 10.213.31.208 with HTTP; Fri, 20 Aug 2010 07:02:32 -0700 (PDT) In-Reply-To: References: From: Sean McEligot Date: Fri, 20 Aug 2010 10:02:32 -0400 Message-ID: Subject: Re: war not redeploying To: Tomcat Users List Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On Thu, Aug 19, 2010 at 3:09 PM, Sean McEligot wrote: > I now have one war that redeploys correctly (Cavs.war) and one that > does not redeploy (blview.war) > > > $ ls -l work/Catalina/localhost/ > total 0 > drwxrwx---+ 1 Administrators SYSTEM 0 2010-08-19 14:35 Cavs > drwxrwx---+ 1 Administrators SYSTEM 0 2010-08-19 14:01 blview (todays dat= e) > > $ ls -l webapps/ > total 19088 > drwxrwx---+ 1 Administrators SYSTEM =A0 =A0 =A0 =A00 2010-08-19 14:34 Cav= s > -rwxr-x---+ 1 Sean McEligot =A0None =A0 17543690 2010-08-19 14:34 Cavs.wa= r > drwxrwx---+ 1 Administrators SYSTEM =A0 =A0 =A0 =A00 2010-08-18 15:36 blv= iew > (yesterdays date) > -rwxr-x---+ 1 Sean McEligot =A0None =A0 =A01995771 2010-08-19 13:21 blvie= w.war > > =A0ls -ltr webapps/blview/WEB-INF/classes/blview/servlets/ > otal 8 > rwxrwx---+ 1 Administrators SYSTEM 5557 2010-08-18 14:50 BLView.class > (yesterdays date) > > $ unzip -l webapps/blview.war | grep servlets > =A0 =A0 5558 =A008-19-2010 08:10 > WEB-INF/classes/blview/servlets/BLView.class (today's date) > > > It reaches the checkResourcs code that checks the timestamps > > 19-Aug-2010 14:04:16.78 FINE > org.apache.catalina.startup.HostConfig.checkResources Checking > context[/blview] redeploy resource > C:\gfm\springsource-tc\misc\webapps\blview.war > > 19-Aug-2010 14:04:16.78 FINE > org.apache.catalina.startup.HostConfig.checkResources Checking > context[/blview] redeploy resource > C:\gfm\springsource-tc\misc\webapps\blview > > 19-Aug-2010 14:04:16.78 FINE > org.apache.catalina.startup.HostConfig.checkResources Checking > context[/blview] reload resource > c:\gfm\springsource-tc\misc\conf\web.xml > > 19-Aug-2010 14:04:16.78 FINE > org.apache.catalina.startup.HostConfig.checkResources Checking > context[/blview] reload resource > c:\gfm\springsource-tc\misc\conf\context.xml > > > ---- > =A0HostConfig.java : checkResources > ---- > =A0 =A0 =A0 =A0 =A0 =A0File resource =3D new File(resources[i]); > =A0 =A0 =A0 =A0 =A0 =A0if (log.isDebugEnabled()) > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0log.debug("Checking context[" + app.name += "] redeploy > resource " + resource); > ---- > Checking context[/blview] redeploy resource > C:\gfm\springsource-tc\misc\webapps\blview.war > ---- > =A0 =A0 =A0 =A0 =A0 =A0if (resource.exists()) { > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0long lastModified =3D ((Long) > app.redeployResources.get(resources[i])).longValue(); > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0if ((!resource.isDirectory()) && > resource.lastModified() > lastModified) { > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0// Undeploy application > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0if (log.isInfoEnabled()) > ---- > Never gets here > ----- > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0log.info(sm.getString("hos= tConfig.undeploy", app. I'm trying to figure out the logic behind redeploying a war. From examining HostConfig.java, it looks like: 1. remembered date of the war file is compared to the current date of the war file and the application is redeployed if the current date is newer. 2. The remembered date of the expanded war is compared to the current date of that directory and the application is reloaded if the current directory date is newer. So if I deploy while the server is down, it never will be noticed by tomcat? This is not what I would have expected. What I would expect to happen is tomcat to compare the war file date to the expanded directory date and redeploy if the war file is newer. --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org For additional commands, e-mail: users-help@tomcat.apache.org