Java Mailing List Archive

http://www.junlu.com/

Home » Home (12/2007) » Apache Tomcat »

Modifications to JNDI environment from admin or jmxproxy not seen in application

Eric

2006-12-01


When I change JNDI environment entries in the admin app or from the
manager app's jmxproxy, those changes are not reflected in the Context
I'm getting in my app when I do
new InitialContext().lookup("java:comp/env/test")
Since I'm doing that per-call in my webapp (and printing the result
directly to the logs), I'd expect to get my change. But, even if I
delete that environment entry, after having declared it in my
context.xml as per below, it's still there in my webapp.

<Context ... useNaming="true" (or false) >
 <Environment name="test"
          value="10"
          type="java.lang.Integer"/>

Similarly, if I take that entry out of my context.xml and then add it
manually from admin, etc. it is not seen by my webapp. I even dropped
in a modified org/apache/naming/NamingContext class that println'ed
from its bind message...I'd see my entries from context.xml get bound
on deploy, but when I change things in the admin app, etc. I see
nothing...those must be being stored in an entirely different Context
class?

What am I doing wrong? Thanks,
eric

--
http://ir.iit.edu/~ej
©2008 junlu.com - Jax Systems, LLC, U.S.A.