Author: kkolinko Date: Tue Apr 27 09:01:37 2010 New Revision: 938363 URL: http://svn.apache.org/viewvc?rev=938363&view=rev Log: If the class implements both interfaces then call addApplicationLifecycleListener only once.
Modified: tomcat/trunk/java/org/apache/catalina/core/ApplicationContext.java Modified: tomcat/trunk/java/org/apache/catalina/core/ApplicationContext.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/core/ApplicationContext.java?rev=938363&r1=938362&r2=938363&view=diff ============================================================================== --- tomcat/trunk/java/org/apache/catalina/core/ApplicationContext.java (original) +++ tomcat/trunk/java/org/apache/catalina/core/ApplicationContext.java Tue Apr 27 09:01:37 2010 @@ -1266,13 +1266,9 @@ public class ApplicationContext match = true; } - if (t instanceof HttpSessionListener) { - context.addApplicationLifecycleListener(t); - match = true; - } - - if (t instanceof ServletContextListener) { - // TODO SERVLET3 - also need to check caller? spec isn't clear + if (t instanceof HttpSessionListener + || t instanceof ServletContextListener) { + // TODO SERVLET3 - if ServletContextListener then also need to check caller? spec isn't clear context.addApplicationLifecycleListener(t); match = true; } --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org