On Thu, Aug 19, 2010 at 3:09 PM, Sean McEligot <seanmc...@gmail.com> 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 date) > > $ ls -l webapps/ > total 19088 > drwxrwx---+ 1 Administrators SYSTEM 0 2010-08-19 14:34 Cavs > -rwxr-x---+ 1 Sean McEligot None 17543690 2010-08-19 14:34 Cavs.war > drwxrwx---+ 1 Administrators SYSTEM 0 2010-08-18 15:36 blview > (yesterdays date) > -rwxr-x---+ 1 Sean McEligot None 1995771 2010-08-19 13:21 blview.war > > ls -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 > 5558 08-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 > > > ---- > HostConfig.java : checkResources > ---- > File resource = new File(resources[i]); > if (log.isDebugEnabled()) > log.debug("Checking context[" + app.name + "] redeploy > resource " + resource); > ---- > Checking context[/blview] redeploy resource > C:\gfm\springsource-tc\misc\webapps\blview.war > ---- > if (resource.exists()) { > long lastModified = ((Long) > app.redeployResources.get(resources[i])).longValue(); > if ((!resource.isDirectory()) && > resource.lastModified() > lastModified) { > // Undeploy application > if (log.isInfoEnabled()) > ---- > Never gets here > ----- > log.info(sm.getString("hostConfig.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-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org