tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Costin Manolache <cmanola...@yahoo.com>
Subject Re: cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/core StandardContext.java
Date Wed, 12 Mar 2003 21:45:05 GMT
remm@apache.org wrote:

> remm        2003/03/12 13:32:50
> 
>   Modified:    catalina/src/share/org/apache/catalina/core
>                         StandardContext.java
>   Log:
>   - If init needs guards against being invoked twice, this also needs it.
>   - Any explanation why, BTW ?

The general idea is simple: components shouldn't assume a perfect world
where everything is consistent and loaded in a certain order.

In this particular case - I assume the mbean for the context couldn't
find the parent to register itself - when it adds itself to the host, the
host will call setParent(). On destroy - I don't think this is a problem.



Costin



>   
>   Revision  Changes    Path
>   1.26      +4 -2     
>  
jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/core/StandardContext.java
>   
>   Index: StandardContext.java
>   ===================================================================
>   RCS file:
>  
/home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/core/StandardContext.java,v
>   retrieving revision 1.25 retrieving revision 1.26
>   diff -u -r1.25 -r1.26
>   --- StandardContext.java    12 Mar 2003 06:24:15 -0000      1.25
>   +++ StandardContext.java    12 Mar 2003 21:32:49 -0000      1.26
>   @@ -4780,7 +4780,9 @@
>            if( started ) {
>                stop();
>            }
>   -        parent.removeChild(this);
>   +        if (parent != null) {
>   +            parent.removeChild(this);
>   +        }
>        }
>    
>        public void create() throws Exception{



---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org


Mime
View raw message