|
Home > Archive > WebSphere Application Server > November 2005 > How to get the latest JNDI variable setting
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
How to get the latest JNDI variable setting
|
|
|
| I have a JNDI variable ("Foo") defined from the websphere console. In the code I want to always get the latest console setting.
The JNDI documentation indicates that setting Context.AUTHORITATIVE to "true" should by pass all caching.
My code is:
<code>
Hashtable env = new Hashtable();
env.put(Context.AUTHORITATIVE, "true");
javax.naming.InitialContext ctx = new javax.naming.InitialContext(env);
value = (String) ctx.lookup("Foo");
</code>
It picks up the inital setting of Foo, but never picks up any changes.
Any idea how this is supposed to work??
Thanks,
-- Frank
| |
| Huub van Thienen 2005-11-16, 6:08 pm |
| Hi Frank,
This looks like a caching problem. Whenever I modify a JNDI binding (which is not very often) I always restart WAS to refresh the caches. This is a rather crude solution, but it works for me. Try looking for JNDI and caching, there must be a more civilize
d solution that is less annoying for your users.
Hope this helps,
Huub
|
|
|
|
|