Sorry, Rainer - I didn't read your msg carefully, and Mark's word is right on.

Others will clarify, but as I understand it ... 

The default Host attribute is deployXML "true" which means that the context.xml 
is deployed to conf/[engine]/[host]/appname.xml on application deployment, and 
undeployed appropriately.   Mark's comment to "undeploy your application before 
you deploy the new version and Tomcat will remove the copied context.xml as 
part of the undeployment." is important - you may find that you are using an 
old context.xml if the app is not undeployed cleanly - that may have led to 
your original comment, I don't recall.

If deployXML is "false", your infrastructure team, or container/instance owner 
is responsible for maintaining resource contexts on applications' behalf - the 
case where backend security is a little more an issue, or "the developer 
doesn't really know best".  Undeploying the application in this case *removes* 
the conf/[engine]/[host]/appname.xml, requiring manual/process intervention to 
restore it.

Apologies for the confusion.
--
Mike

-----Original Message-----
From: Rainer Frey [mailto:rainer.f...@inxmail.de] 
Sent: Tuesday, July 21, 2009 2:40 AM
To: Tomcat Users List
Subject: Re: Context.xml not updating dataSource

On Monday 20 July 2009 17:08:15 Mike Frohme wrote:

> > > >> Edit the copy of the context.xml file and all will work as you
> > > >> expect.
> > >
> > > 1. In production, the operations folks don't have to unpack the app,
> > > edit the context file and re-pack the app to edit the configuration.
> > >
> > > 2. When a new version of the app is installed, the environment specific
> > > configuration isn't lost.
> > >
> > > If you want to remove the old configuration, undeploy the app first
> > > which will remove the old configuration file.
> >
> > A an aside, wouldn't it be nice if it were configurable whether tomcat
> > copies the context.xml to $CATALINA_BASE/conf?  Then administrators could
> > decide to never have local configuration and always rely on the config
> > within the war?
> Sorry for the late reply, Rainer.
>
> There is, in principle.  Set deployXML to false in the Host declaration in
> your server.xml and it will do exactly what you want.  On the flip side,
> tomcat will remove the configuration when the app is undeployed, so you
> need a little care in your deployment process.

Thanks for the response. Actually, doesn't this do the exact oposite of what I 
want?

What I want (as option): "I know that developer/packager did it right and I 
never want to have local configuration. Always use the context.xml within the 
currently deployed application, updated every time I redeploy the app."

deployXML=false seems to do: "Never trust the developer, don't even copy their 
context configuration to local configuration if there is no local one yet. 
Only use a configuration I manually put on the server".

Could anyone please comment whether I understand that right?

> Mike

Rainer

---------------------------------------------------------------------
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