tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Remy Maucherat <>
Subject Re: cvs commit: jakarta-tomcat-4.0/catalina/src/share/org/apache/naming
Date Wed, 13 Nov 2002 09:19:26 GMT
Remy Maucherat wrote:

> wrote:
> > glenn       2002/11/12 18:23:11
> >
> >   Modified:    catalina/src/share/org/apache/catalina/core
> >               
> >                catalina/src/share/org/apache/naming
> >   Log:
> >   Bug fix for BUG #13364
> >
> >   A Web Application Context reload by the manager web application
> >   was causing named JNDI resources to disappear.
> >
> >   A webapp reload needs to dump the webapp classloader, then
> >   recreate. The CL is bound to the naming context so the
> >   reload was issing a NamingContext STOP_EVENT and then a
> >   START_EVENT.  This removed all the JNDI named resources
> >   but the code which runs at webapp startup which creates
> >   the JNDI named resources is not run on a reload.
> >
> >   I fixed this by removing the START and STOP events and
> >   lifecycle events whose only purpose is to bind or unbind the
> >   ClassLoader to the JNDI context.
> This fix seems incorrect to me. The naming context must be destroyed, as
> the references which are bound in it have been created by the old
> classloader.
> The NamingResources object is supposed to contain all the necessary data
> to recrate the JNDI context. The question, and what I was planning to
> investigate, is why it doesn't work. I think it did in the past.
> I'll revert this patch when I find a better fix for the bug.

I investigated the problem as much as I could, and I cannot reproduce 
the original bug.
The patch introduces wrong behavior as explained, so I am -1 for it, and 
will revert it.

The original report was that the JNDI resources were disappearing after 
a reload of a context using the manager.
Here is what I did to try to reproduce it:
- full recompile and start of Tomcat 4.1, after adding a user for the 
manager webapp
- use of the JNDI servlet to display the naming environment of the 
"examples" context (
- use of the HTML interface to the manager to reload the "examples" 
context (
- reload was successful
- use JNDI servlet in a different browser (Moz, the first one was in 
IE); result is the same as the first attempt

So I would like detailed information on:
- what is actually failing
- how to reproduce it


To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message