You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Marco Ehrentreich <er...@ehrentreich.net> on 2010/07/17 10:50:43 UTC

Is it possible to disable caching/force reloading of JNDI resources?

Hi guys,

I'm stuck with a JNDI resource object factory problem. Hopefully you can
help me out with this issue.

My idea was to provide multiple web applications running inside a Tomcat
instance with configuration properties from config files located outside
the WAR file of the applications. I'm currently trying to provide
these configuration properties with a global naming resource (defined
inside the server.xml) which is consumed by the said applications to
keep the configuration container independent and to avoid direct file
access from a web application.

So far almost everything already works perfectly! Except that Tomcat
obviously caches resources which are looked up via JNDI. This way I have
to restart Tomcat every time the external config files changes because
the web applications never access my ObjectFactory again after Tomcat
has cached the result of the ObjectFactory.

Accordingly to the documentation an implementation of ObjectFactory
should be accessed each time a web application looks it up with its JNDI
key. But that's definitely not the case here.

Any ideas or thoughts on this issue? Is there any way to disable this
behavior of Tomcat's JNDI resource management?
Or any comments on this plan to externalize the application
configuration in general?

Thanks in advance!

Marco



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


Re: Is it possible to disable caching/force reloading of JNDI resources?

Posted by Mark Thomas <ma...@apache.org>.
On 17/07/2010 09:50, Marco Ehrentreich wrote:
> Accordingly to the documentation an implementation of ObjectFactory
> should be accessed each time a web application looks it up with its JNDI
> key. But that's definitely not the case here.

What documentation?

Mark



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


Re: Is it possible to disable caching/force reloading of JNDI resources?

Posted by Marco Ehrentreich <er...@ehrentreich.net>.
Am 17.07.2010 12:56, schrieb Mark Thomas:
> On 17/07/2010 09:50, Marco Ehrentreich wrote:
>> Accordingly to the documentation an implementation of ObjectFactory
>> should be accessed each time a web application looks it up with its JNDI
>> key. But that's definitely not the case here.
> 
> What documentation?
> 
> Mark
> 
Sorry, I'll try to find the said documentation again. I think it was
something from the original Tomcat documentation but I can't find it at
the moment.

Maybe I missunderstood it but at least it didn't mention that the result
of an ObjectFactory is only produced once and then cached by Tomcat.

Can you tell me some more details about this issue? Or would you
recommend a completely different approach?

Marco

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