geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From djen...@apache.org
Subject svn commit: r999680 - /geronimo/external/trunk/tomcat-parent-7.0.0/catalina/src/main/java/org/apache/catalina/core/StandardContext.java
Date Tue, 21 Sep 2010 22:50:17 GMT
Author: djencks
Date: Tue Sep 21 22:50:17 2010
New Revision: 999680

URL: http://svn.apache.org/viewvc?rev=999680&view=rev
Log:
GERONIMO-5620 bug 49952 don't wipe out listeners added before start

Modified:
    geronimo/external/trunk/tomcat-parent-7.0.0/catalina/src/main/java/org/apache/catalina/core/StandardContext.java

Modified: geronimo/external/trunk/tomcat-parent-7.0.0/catalina/src/main/java/org/apache/catalina/core/StandardContext.java
URL: http://svn.apache.org/viewvc/geronimo/external/trunk/tomcat-parent-7.0.0/catalina/src/main/java/org/apache/catalina/core/StandardContext.java?rev=999680&r1=999679&r2=999680&view=diff
==============================================================================
--- geronimo/external/trunk/tomcat-parent-7.0.0/catalina/src/main/java/org/apache/catalina/core/StandardContext.java
(original)
+++ geronimo/external/trunk/tomcat-parent-7.0.0/catalina/src/main/java/org/apache/catalina/core/StandardContext.java
Tue Sep 21 22:50:17 2010
@@ -2422,7 +2422,7 @@ public class StandardContext extends Con
         if ((jspFile != null) && !jspFile.startsWith("/")) {
             if (isServlet22()) {
                 if(log.isDebugEnabled())
-                    log.debug(sm.getString("standardContext.wrapper.warning", 
+                    log.debug(sm.getString("standardContext.wrapper.warning",
                                        jspFile));
                 wrapper.setJspFile("/" + jspFile);
             } else {
@@ -4258,8 +4258,14 @@ public class StandardContext extends Con
                 lifecycleListeners.add(results[i]);
             }
         }
-
+        //Listeners may have been added by ServletContextInitializers.  Put them after the
ones we know about.
+        for (Object eventListener: getApplicationEventListeners()) {
+            eventListeners.add(eventListener);
+        }
         setApplicationEventListeners(eventListeners.toArray());
+        for (Object lifecycleListener: getApplicationLifecycleListeners()) {
+            lifecycleListeners.add(lifecycleListener);
+        }
         setApplicationLifecycleListeners(lifecycleListeners.toArray());
 
         // Send application start events



Mime
View raw message