DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=29727>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=29727

JNDI env-entry not reload when context reloaded

           Summary: JNDI env-entry not reload when context reloaded
           Product: Tomcat 5
           Version: 5.0.25
          Platform: All
        OS/Version: Windows XP
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: Unknown
        AssignedTo: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]


If environment entries are changed in web.xml, and the application context is 
restarted, the values in the JNDI context are the old values.

If the environment entries are changed via the Tomcat 'admin' interface, then 
the values provided to the context are correct.

The following code is can be used to check the environment:

        try {
            InitialContext ic = new InitialContext();
            NamingEnumeration enum = ic.listBindings("java:comp/env");

            while (enum.hasMore()) {
                Binding binding = (Binding) enum.next();
                jndi.setProperty(binding.getName(), "" + binding.getObject());
                System.out.println("jndi setting: " + binding.getName() + "=" 
+ binding.getObject());
            }
        } catch (NamingException e) {
            System.err.println("unable to read JNDI settings, " + e);
        }


The web.xml fragment looks as follows:

        <env-entry>
                <env-entry-name>DatabaseURL</env-entry-name>
                <env-entry-value>jdbc:hsqldb:hsql://localhost</env-entry-value>
                <env-entry-type>java.lang.String</env-entry-type>
        </env-entry>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to