From 9171d6b6caaccd34fe2ed4b0f371df8e11f97cf2 Mon Sep 17 00:00:00 2001 From: markt Date: Thu, 9 Jun 2011 19:04:37 +0000 Subject: [PATCH] Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=51344 Fix problem with Lifecycle re-factoring for deprecated embedded class that prevented events being triggered. git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@1134042 13f79535-47bb-0310-9956-ffa450edef68 --- java/org/apache/catalina/startup/Embedded.java | 46 -------------------------- webapps/docs/changelog.xml | 10 ++++-- 2 files changed, 7 insertions(+), 49 deletions(-) diff --git a/java/org/apache/catalina/startup/Embedded.java b/java/org/apache/catalina/startup/Embedded.java index 3bc16d405..9fb781ffa 100644 --- a/java/org/apache/catalina/startup/Embedded.java +++ b/java/org/apache/catalina/startup/Embedded.java @@ -32,7 +32,6 @@ import org.apache.catalina.Globals; import org.apache.catalina.Host; import org.apache.catalina.Lifecycle; import org.apache.catalina.LifecycleException; -import org.apache.catalina.LifecycleListener; import org.apache.catalina.LifecycleState; import org.apache.catalina.Loader; import org.apache.catalina.Realm; @@ -44,7 +43,6 @@ import org.apache.catalina.core.StandardHost; import org.apache.catalina.core.StandardService; import org.apache.catalina.loader.WebappLoader; import org.apache.catalina.security.SecurityConfig; -import org.apache.catalina.util.LifecycleSupport; import org.apache.juli.logging.Log; import org.apache.juli.logging.LogFactory; import org.apache.tomcat.util.IntrospectionUtils; @@ -173,12 +171,6 @@ public class Embedded extends StandardService { /** - * The lifecycle event support for this component. - */ - protected LifecycleSupport lifecycle = new LifecycleSupport(this); - - - /** * The default realm to be used by all containers associated with * this component. */ @@ -759,44 +751,6 @@ public class Embedded extends StandardService { /** - * Add a lifecycle event listener to this component. - * - * @param listener The listener to add - */ - @Override - public void addLifecycleListener(LifecycleListener listener) { - - lifecycle.addLifecycleListener(listener); - - } - - - /** - * Get the lifecycle listeners associated with this lifecycle. If this - * Lifecycle has no listeners registered, a zero-length array is returned. - */ - @Override - public LifecycleListener[] findLifecycleListeners() { - - return lifecycle.findLifecycleListeners(); - - } - - - /** - * Remove a lifecycle event listener from this component. - * - * @param listener The listener to remove - */ - @Override - public void removeLifecycleListener(LifecycleListener listener) { - - lifecycle.removeLifecycleListener(listener); - - } - - - /** * Start nested components ({@link Connector}s and {@link Engine}s) and * implement the requirements of * {@link org.apache.catalina.util.LifecycleBase#startInternal()}. diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml index 0cf128aa7..ecc8b17ca 100644 --- a/webapps/docs/changelog.xml +++ b/webapps/docs/changelog.xml @@ -46,6 +46,11 @@ + 51249: Further improve system property replacement code + in ClassLoaderLogManager of Tomcat JULI to cover some corner cases. + (kkolinko) + + 51264: Improve the previous fix for this issue by returning the connection to the pool when not in use so it does not appear to be an abandoned connection. Patch provided by Felix Schumacher. (markt) @@ -77,9 +82,8 @@ embed it may. (markt) - 51249: Further improve system property replacement code - in ClassLoaderLogManager of Tomcat JULI to cover some corner cases. - (kkolinko) + 51344: Fix problem with Lifecycle re-factoring for deprecated + embedded class that prevented events being triggered. (markt) -- 2.11.0