You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2003/03/14 05:40:46 UTC
DO NOT REPLY [Bug 17985] New: -
NamingContextListener not added as ContainerListener and PropertyChangeListener
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=17985>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND
INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=17985
NamingContextListener not added as ContainerListener and PropertyChangeListener
Summary: NamingContextListener not added as ContainerListener and
PropertyChangeListener
Product: Tomcat 4
Version: 4.1.18
Platform: All
OS/Version: All
Status: NEW
Severity: Normal
Priority: Other
Component: Catalina
AssignedTo: tomcat-dev@jakarta.apache.org
ReportedBy: parag@veritas.com
hi,
When a StandardContext is started, the following code adds the
NamingContextListener to the standard context. However, as one can see from the
code, the NamingContextListener is not being added as a ContainerListener and a
PropertyChangeListener (it's only added as a LifeCycleListener). Due to this,
calling addResource(), remoteResource() etc on the context does not result in
the NamingContextListener being notified, which results in the JNDI bindings of
the context not reflecting the change.
-- Code from StandardContext.java --
if (ok && isUseNaming()) {
if (namingContextListener == null) {
namingContextListener = new NamingContextListener();
namingContextListener.setDebug(getDebug());
namingContextListener.setName(getNamingContextName());
addLifecycleListener(namingContextListener);
}
}
-- End of code
-- Patched code should be:
if (ok && isUseNaming()) {
if (namingContextListener == null) {
namingContextListener = new NamingContextListener();
namingContextListener.setDebug(getDebug());
namingContextListener.setName(getNamingContextName());
addLifecycleListener(namingContextListener);
addContainerListener(namingContextListener);
addPropertyChangeListener(namingContextListener);
}
}
-- End of Patch
thanks,
parag.
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org