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=42547>.
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=42547





------- Additional Comments From [EMAIL PROTECTED]  2007-05-31 09:12 -------
This is related to a change made to fix the following bug:

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

First, it appears that contrary to the documentation (located at
http://tomcat.apache.org/tomcat-5.5-doc/config/globalresources.html#Enviroment%20Entries),
setting the 'override' attribute of a <Enviroment> tag inside
<GlobalNameingResources> to 'true' will never be (and perhaps never was) 
obeyed. 

Allowing <env-entry> overrides of global <Enviroment> entries (through
<ResourceLinks> in the context descriptor) may, it could be argued, be illegal
(not the mention confusing). The current behavior, with the NPE, makes it
illegal (intentional or not).

However, it could also be argued that, with an external context descriptor, you
should be able to override anything set via <env-entry> in web.xml if you wanted
to (and this is what the documentation seems to indicate). 

Finally, there's restoring the previous behavior, which never allows any
overriding and always (silently) takes the global value, regardless of any
corresponding <env-entry>s or any reloading.

Essentially, you can a) make it work as described by the documentation, b) blow
up, or c) silently take the global values on load (or reload) always. 

If b, I recommend blowing up with something more descriptive than the NPE we
have now and changing the doco.

If c, you could just check if (in
org.apache.catalina.deploy.NamingResources.java, line 188), findEnviroment()
retuns null. If it does, log a warning and return. If not, do the getOverride()
if. You should also update the doco in this case too.

    if (entries.containsKey(environment.getName())) {
        ContextEnvironment ce = findEnvironment(environment.getName());
        if (ce == null) {
            // Log a warning: 
            return;
        }
        if (findEnvironment(environment.getName()).getOverride()) {
            removeEnvironment(environment.getName());
        } else {
            return;
        }
    }


-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

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

Reply via email to