Notes inline...

"Caldarale, Charles R" <chuck.caldar...@unisys.com> wrote on 05/17/2010
10:11:47 AM:

> > From: peter_f...@blm.gov [mailto:peter_f...@blm.gov]
> > Subject: Misunderstanding deployOnStartup actions
> >
> >
> > I'm a bit confused about what the deployOnStartup setting is
> > supposed to do, especially when it's set to "false".
>
> It defers webapp deployment until after the container is up and
> running.  Some external event is required to trigger the deployment.

That makes sense, but doesn't seem to happen - see below (1).

>
> >
> > if you set it to "false", then applications can only be
> > started by being hot-deployed
>
> No, you can use the manager or equivalent APIs to do the deployment,
> or you can configure the webapp in server.xml (not recommended).

The setup I have has all the delivered applications (manager, docs, etc.)
stripped out. There's just my application. I didn't place a context in
server.xml although I've tried it with a
conf/Catalina/localhost/[my-app-name].xml context entry, which doesn't seem
to have any effect.

>
> > I found that setting autoDeploy=true and deployOnStartup=false,
> > existing webapps are still started but not until after Tomcat
> > has already started
>
> As expected; the first request to the webapp triggers deployment.

(1) - but the app is deployed after a few seconds even when there is no
request (and if autoDeploy and deployOnStartup are both false, the app
still doesn't start on a request and I get a blank response).

>
> > I also found that setting autoDeploy=false and deployOnStartup=false,
> > no applications will start
>
> IIRC, any configured in server.xml will be started.

I haven't tried that (as I mentioned, I use an external context.xml but it
doesn't seem to have an effect).

>
> > 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
>
> Not true; double deployment occurs when you badly configure a webapp
> located in the appBase directory, such as having its <Context>
> element in server.xml with a path attribute that does not match the
> name of the .war file or directory.

Ok, that makes sense.

>
>  - Chuck
>
>
> THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE
> PROPRIETARY MATERIAL and is thus for use only by the intended
> recipient. If you received this in error, please contact the sender
> and delete the e-mail and its attachments from all computers.
>
>
> ---------------------------------------------------------------------
> 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

Reply via email to