You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Mike Frohme <mf...@genscape.com> on 2009/06/22 05:38:12 UTC

Removal of conf/[engine]/[host]/application_context.xml on webapp redeploy with deployXML = "false"?

Hi,

  Trying to understand behavior of TC (6.0.x) deployment process of webapps with the following <Host> definition (server.xml):

<Host name="localhost"  appBase="webapps" 
    unpackWARs="true" autoDeploy="true" deployXML="false"
    xmlValidation="false" xmlNamespaceAware="false">

In short, we want to manually manage conf/[engine]/[host]/appname.xml files for each webapp.  Almost everything works exactly as expected.  The only odd behavior is that on an application re-deploy, the (manually managed) conf/[engine]/[host]/appname.xml is removed as part of the undeploy process. The docs seem to support this, but it seems wrong somehow.

Yes, I know the docs also say you should "probably turn off auto-deploy if you explicitly manage context" - we're working on our process for that.  

In short, this perceived lack of symmetry in the behavior prompted me to ask the question. ...

When deployXML is false ... if you don't parse and update context on deploy, why would you do it on undeploy?

As additional info, no <Context> blocks are defined in server.xml, and apps are deployed as WAR files.  Yes, they contain a META-INF/context.xml - used locally in development, but not in the deployed environment.

Thanks for any insight/feedback you might have.

--
Mike

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


RE: Removal of conf/[engine]/[host]/application_context.xml on webappredeploy with deployXML = "false"?

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: Mike Frohme [mailto:mfrohme@genscape.com]
> Subject: Removal of conf/[engine]/[host]/application_context.xml on
> webappredeploy with deployXML = "false"?
> 
> In short, we want to manually manage conf/[engine]/[host]/appname.xml
> files for each webapp.

Then your deployment procedure should actually do that, and copy the associated appName.xml file to conf/[engine]/[host] whenever you deploy the webapp.

> The only odd behavior is that on an application re-deploy, the
> (manually managed) conf/[engine]/[host]/appname.xml is removed as part
> of the undeploy process. The docs seem to support this, but it seems
> wrong somehow.

It's necessary to avoid timing windows where the <Context> element is there but the webapp isn't.

> Yes, I know the docs also say you should "probably turn off auto-deploy
> if you explicitly manage context"

You would normally have autoDeploy off in a production environment anyhow, since polling the webapp files for changes does consume some resources.

> When deployXML is false ... if you don't parse and update context on
> deploy, why would you do it on undeploy?

The deployXML attribute just says to ignore the META-INF/context.xml file during deployment; nothing else is implied.  If you want some means of indicating to Tomcat that the appName.xml should not be removed when the webapp is undeployed, you'll need to request an enhancement.  I don't know how well it would be received, given the complication of having a <Context> element around without the corresponding webapp files.

 - 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-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org