Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=51344
authormarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Thu, 9 Jun 2011 19:04:37 +0000 (19:04 +0000)
committermarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Thu, 9 Jun 2011 19:04:37 +0000 (19:04 +0000)
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
webapps/docs/changelog.xml

index 3bc16d4..9fb781f 100644 (file)
@@ -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()}.
index 0cf128a..ecc8b17 100644 (file)
   <subsection name="Catalina">
     <changelog>
       <fix>
+        <bug>51249</bug>: Further improve system property replacement code
+        in ClassLoaderLogManager of Tomcat JULI to cover some corner cases.
+        (kkolinko)
+      </fix>
+      <fix>
         <bug>51264</bug>: 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)
       </fix>
       <fix>
-        <bug>51249</bug>: Further improve system property replacement code
-        in ClassLoaderLogManager of Tomcat JULI to cover some corner cases.
-        (kkolinko)
+        <bug>51344</bug>: Fix problem with Lifecycle re-factoring for deprecated
+        embedded class that prevented events being triggered. (markt) 
       </fix>
     </changelog>
   </subsection>