tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jonas Wagner" <Jonas.Wag...@bucher-suter.ch>
Subject Configuring DataSources using jsp: reload context.xml?
Date Wed, 02 Jul 2008 15:53:51 GMT
Hello,

I'm trying to write a configuration frontend for a webapp. This
application uses several data sources, and it should be possible to
change the username/password/database/... using the configuration
frontend.

My idea was that the configuration servlet would modify the
META-INF/context.xml file of my webapp, more precicely the <Resource>
entries in this file. However, it seems that changes to those entries
are not recognized by Tomcat. Later I read on this mailing list (
http://marc.info/?l=tomcat-user&m=121431733620462&w=2 ) that JNDI
resources are only reloaded on redeploy, so I think my approach is
somewhat wrong...

Are there any ideas on how to change JNDI resources from a webapp?

One Idea of mine was to create a DataSource manually and then use
Context.bind(). This seems to destroy the whole portability benefit of
using JNDI, though. Also I'm unsure whether such a binding would persist
if Tomcat is restarted.

I'd appreciate any tipps.
Jonas


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


Mime
View raw message