tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Thomas <ma...@apache.org>
Subject Re: Context.xml not updating dataSource
Date Mon, 22 Jun 2009 11:53:47 GMT
Rainer Frey wrote:
> On Monday 22 June 2009 12:02:49 Mark Thomas wrote:
> 
>> You are editing the wrong file. When a web application is first
>> deployed, any META-INF/context.xml is copied to
>> CATALINA_BASE/conf/<enginename>/<hostname> (usually
>> CATALINA_BASE/conf/Catalina/localhost) and renamed to appName.xml. Eg
>> for a war file named myapp.war a META-INF/context.xml would be renamed
>> to myapp.xml#
>>
>> Edit the copy of the context.xml file and all will work as you expect.
> 
> What is the reason for this behavior? It seems quite counterintuitive. If I 
> package a new version of my application with updated configuration, I usually 
> expect that this configuration is used when I deploy this application, esp. 
> with the manager deployment functionality. 
> 
> If I want to deploy the application on different tomcat installations, I have 
> to delete the file from CATALINA_BASE/conf on each one, and it even might 
> have a different path on each. So this behavior causes more work for my use 
> case, and I have to do s.th. in addition to the standard deployment call. Is 
> there a benefit from it?

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.

Mark



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


Mime
View raw message