tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r909563 - /tomcat/trunk/java/org/apache/catalina/core/StandardHost.java
Date Fri, 12 Feb 2010 19:15:34 GMT
Author: markt
Date: Fri Feb 12 19:15:32 2010
New Revision: 909563

URL: http://svn.apache.org/viewvc?rev=909563&view=rev
Log:
Add listener before child is added else listener won't get called on first load

Modified:
    tomcat/trunk/java/org/apache/catalina/core/StandardHost.java

Modified: tomcat/trunk/java/org/apache/catalina/core/StandardHost.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/core/StandardHost.java?rev=909563&r1=909562&r2=909563&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/core/StandardHost.java (original)
+++ tomcat/trunk/java/org/apache/catalina/core/StandardHost.java Fri Feb 12 19:15:32 2010
@@ -578,15 +578,16 @@
     @Override
     public void addChild(Container child) {
 
+        if (child instanceof Lifecycle) {
+            ((Lifecycle) child).addLifecycleListener(
+                    new MemoryLeakTrackingListener());
+        }
+
         if (!(child instanceof Context))
             throw new IllegalArgumentException
                 (sm.getString("standardHost.notContext"));
         super.addChild(child);
 
-        if (child instanceof Lifecycle) {
-            ((Lifecycle) child).addLifecycleListener(
-                    new MemoryLeakTrackingListener());
-        }
     }
 
 



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


Mime
View raw message