Search code examples
tomcattomcat6

Tomcat Auto Deploy Feature is this good?


I downloaded and setup my Apache Tomcat 6 in our production server. I then started it to see if it's running, and found out that its okay.

It runs and then I place my project war file there. I am about to restart the tomcat service when I notice that that my web archive file was already unzipped and my project web file is already set at the web apps folder.

I think, my setup has an auto-deploy feature but I kept on thinking if this is a good thing?

I have these questions in mind:

  1. Does Tomcat really auto deploys web archive file and what is the frequency that it does?
  2. Is this a nice feature?
  3. So what if I leave my war file there, does that mean that Tomcat will reload or unzip the archive file every now and then?
  4. Is what Tomcat does to my war file the same as when I properly restart my tomcat and let the tomcat service deploy my war file?

Solution

  • Have a look at the manual. It says:

    If the Host autoDeploy attribute is "true", the Host will attempt to deploy and update web applications dynamically, as needed, for example if a new .WAR is dropped into the appBase

    Whether this is a nice feature depends on your requirements. None of the projects I worked on needed this, but hey - your story might be different.

    Autodeploy is the same feature as if you would restart Tomcat and it would find a .war sitting around, the only difference is that there has to be a polling thread which looks for changes in the appBase folder.