tomcat-users mailing list archives

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

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

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 ( ) 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.

To start a new topic, e-mail:
To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message