tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Konstantin Kolinko" <>
Subject Re: Configuring DataSources using jsp: reload context.xml?
Date Tue, 08 Jul 2008 14:41:36 GMT
Hi, Jonas

Regarding your previous e-mails where you tried to overwrite

Please note, that at deployment time this file is copied to

I think that you should either update the copy of that file and then
restart Tomcat.
If you update META-INF/context.xml then redeployment of the application
is required.

I guess that some of your actions with Eclipse IDE are causing redeployment.
Maybe it is the step that calls "Run As..".

Also, I suggest you to look at JMX interface of Tomcat.
It allows to query and tune server components at run time.

JMX servlet in Tomcat Manager application is an example of using it.

(search the archives for more info on JMX)

Best regards,
Konstantin Kolinko

2008/7/7 Jonas Wagner <>:
> Good morning,
> I'm still trying to figure out how I can cause tomcat to re-read JNDI
> resources. Here is one way I found out earlier:
>> After further tests I found out that the server will reload JNDI data
>> sources if all the following steps are performed:
>> 1. Change the configuration
>> 2. Execute _any_ servlet or jsp using the eclipse command "Run As... >
>>    Run on Server"
>> 3. Restart Tomcat
> As you can see, this only works from within Eclipse, and I have no clue
> how I could cause a JNDI reload in a production environment. In the
> meantime, I tried some further things, e.g. updating the
> last-modified-date of web.xml to cause a redeploy. I also did some more
> googling, but to no avail.
> Does anybody know a way to cause Tomcat to rebuild the JNDI context of
> an application? Or is there a better way to dynamically configure Data
> Sources? Any ideas are welcome.
> In the worst case I'd need to fall back on a custom config file and
> database connections using DriverManager, but this would destroy all
> benefits of pooled connections etc :-(
> Thanks,
> Jonas

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

View raw message