tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Markus Schönhaber <tomcat-us...@list-post.mks-mail.de>
Subject Re: Understanding context.xml
Date Mon, 02 Nov 2009 14:58:21 GMT
Carsten Pohl:

> If I change the testprojekt.xml in
> conf/Catalina/localhost/testprojekt.xml my webapplication will be
> redeployed (assuming the bug is fixed), and it would get the new
> values. If I change the conf/context.xml all my webapps will be
> RELOADED, but new values and changes to values in conf/context.xml
> will not be given to the webapp.

Hm, indeed.
If the changes in conf/context.xml aren't propagated to the webapps, I
don't see the point in reloading the apps on changes in that file.
But I don't know if this is a (known) bug or if it works as designed and
I'm simply misunderstanding how it's supposed to work.

> I am using the tomcat connection pooling to connect to a postgres DB,
> I would like to put the configuration (hostname, username, etc)
> somewhere, so that i can change it, when I change the databasehost.
> Where is the right place to put such a configuration?
> 
> If i put the configuration in conf/context.xml the changes to the
> values wont be given to running applications.
> 
> If i put it in the conf/Catalina/.... the application will be
> redeployed, which causes downtimes.
> 
> What is the right place to PUT and later change the connection infos
> to the database?

Well what is right for you depends on your needs.
I configure <Resource> elements in the webapp's context.xml - but YMMV.

Anyway: I don't know of a built-in method that would enable a webapp to
see changes in a <Resource> configuration without a reload of the app.
But maybe someone else can provide better/additional information.

-- 
Regards
  mks

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


Mime
View raw message