remm        02/01/08 14:22:28

  Modified:    catalina/src/share/org/apache/catalina/core Tag:
                        tomcat_40_branch ContainerBase.java
  Log:
  - Port patch.
  - Fix another deadlock occurring on shutdown. The synced section can be
    smaller while still making sure the method is thread safe (bug 5747).
  - Reported and debugged by David Lecomber <dsl at ts.com>
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.14.2.1  +12 -12    
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/ContainerBase.java
  
  Index: ContainerBase.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/ContainerBase.java,v
  retrieving revision 1.14
  retrieving revision 1.14.2.1
  diff -u -r1.14 -r1.14.2.1
  --- ContainerBase.java        29 Jul 2001 03:43:54 -0000      1.14
  +++ ContainerBase.java        8 Jan 2002 22:22:27 -0000       1.14.2.1
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/ContainerBase.java,v
 1.14 2001/07/29 03:43:54 craigmcc Exp $
  - * $Revision: 1.14 $
  - * $Date: 2001/07/29 03:43:54 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/ContainerBase.java,v
 1.14.2.1 2002/01/08 22:22:27 remm Exp $
  + * $Revision: 1.14.2.1 $
  + * $Date: 2002/01/08 22:22:27 $
    *
    * ====================================================================
    *
  @@ -154,7 +154,7 @@
    * class comments of the implementation class.
    *
    * @author Craig R. McClanahan
  - * @version $Revision: 1.14 $ $Date: 2001/07/29 03:43:54 $
  + * @version $Revision: 1.14.2.1 $ $Date: 2002/01/08 22:22:27 $
    */
   
   public abstract class ContainerBase
  @@ -978,16 +978,16 @@
               if (children.get(child.getName()) == null)
                   return;
               children.remove(child.getName());
  -            if (started && (child instanceof Lifecycle)) {
  -                try {
  -                    ((Lifecycle) child).stop();
  -                } catch (LifecycleException e) {
  -                    log("ContainerBase.removeChild: stop: ", e);
  -                }
  +        }
  +        if (started && (child instanceof Lifecycle)) {
  +            try {
  +                ((Lifecycle) child).stop();
  +            } catch (LifecycleException e) {
  +                log("ContainerBase.removeChild: stop: ", e);
               }
  -            child.setParent(null);
  -            fireContainerEvent(REMOVE_CHILD_EVENT, child);
           }
  +        child.setParent(null);
  +        fireContainerEvent(REMOVE_CHILD_EVENT, child);
   
       }
   
  
  
  

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

Reply via email to