Mark Thomas <ma...@apache.org> wrote on 05/17/2010 10:12:20 AM: > On 17/05/2010 16:56, peter_f...@blm.gov wrote: > > > > I'm a bit confused about what the deployOnStartup setting is supposed to > > do, especially when it's set to "false". > > It controls if apps are deployed when Tomcat starts. > > > The basic question is, what is the purpose of this setting? It would appear > > that if you set it to "false", then applications can only be started by > > being hot-deployed, which seems rather odd but I suppose might be useful in > > a development environment. By experiment I found that setting > > autoDeploy=true and deployOnStartup=false, existing webapps are still > > started but not until after Tomcat has already started (that is, the > > applications get deployed a few seconds after Tomcat has started and is > > listening, rather than during the usual startup sequence). > > That will be hot-deployment kicking in ~15 secs after Tomat starts.
...which confirms what I was thinking. > > > I also found > > that setting autoDeploy=false and deployOnStartup=false, no applications > > will start (which is actually what I'd expect, even though it's pointless). > > Not pointless. It limits deployed apps to *only* those defined in > server.xml. Ok - so if I want my app to start I have to place the context element in server.xml. I would have thought that an external context.xml would have the same effect (I thought that was the point) but I'm not seeing that happen; maybe got something wrong in that file. > > > My guess would be that in a production setting you'd want > > autoDeploy=false/deployOnStartup=true. > > That is usually what I see. > > > There's a couple of places in documentation (online, and also in the > > O'Reilly book) where it says you shouldn't have hot-deployment AND > > deployOnStart enabled because it can result in applications being deployed > > twice - and yet the default is that autoDeploy and deployOnStartup are both > > true, which seems to contradict that, and in any case I've never seen this > > happen. I'm plainly misunderstanding how these settings are supposed to > > work. Perhaps someone here can clarify? > > That is plain wrong. autoDeployment /deployOnStartup do play a role in > double-deployment but only when your configuration is wrong to start with. Well, I guess I'll just have to be careful with my configuration :) (seriously, unless I missed it in the documentation it wasn't clear on double-deployment as a consequence of bad config.) Pete > > Mark > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org