remm        02/01/08 14:21:01

  Modified:    catalina/src/share/org/apache/catalina/core
                        ContainerBase.java
  Log:
  - 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
  1.19      +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.18
  retrieving revision 1.19
  diff -u -r1.18 -r1.19
  --- ContainerBase.java        3 Jan 2002 01:54:37 -0000       1.18
  +++ ContainerBase.java        8 Jan 2002 22:21:01 -0000       1.19
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/ContainerBase.java,v
 1.18 2002/01/03 01:54:37 craigmcc Exp $
  - * $Revision: 1.18 $
  - * $Date: 2002/01/03 01:54:37 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/ContainerBase.java,v
 1.19 2002/01/08 22:21:01 remm Exp $
  + * $Revision: 1.19 $
  + * $Date: 2002/01/08 22:21:01 $
    *
    * ====================================================================
    *
  @@ -156,7 +156,7 @@
    * class comments of the implementation class.
    *
    * @author Craig R. McClanahan
  - * @version $Revision: 1.18 $ $Date: 2002/01/03 01:54:37 $
  + * @version $Revision: 1.19 $ $Date: 2002/01/08 22:21:01 $
    */
   
   public abstract class ContainerBase
  @@ -1030,16 +1030,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);
               }
  -            fireContainerEvent(REMOVE_CHILD_EVENT, child);
  -            child.setParent(null);
           }
  +        fireContainerEvent(REMOVE_CHILD_EVENT, child);
  +        child.setParent(null);
   
       }
   
  
  
  

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

Reply via email to