remm 02/05/14 09:27:05 Modified: catalina/src/share/org/apache/catalina/core ContainerBase.java StandardContext.java StandardPipeline.java StandardServer.java StandardService.java Log: - Make the components of the pipeline use the new "before" and "after" events. Revision Changes Path 1.20 +17 -4 jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/ContainerBase.java Index: ContainerBase.java =================================================================== RCS file: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/ContainerBase.java,v retrieving revision 1.19 retrieving revision 1.20 diff -u -r1.19 -r1.20 --- ContainerBase.java 8 Jan 2002 22:21:01 -0000 1.19 +++ ContainerBase.java 14 May 2002 16:27:05 -0000 1.20 @@ -1,7 +1,7 @@ /* - * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/ContainerBase.java,v 1.19 2002/01/08 22:21:01 remm Exp $ - * $Revision: 1.19 $ - * $Date: 2002/01/08 22:21:01 $ + * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/ContainerBase.java,v 1.20 2002/05/14 16:27:05 remm Exp $ + * $Revision: 1.20 $ + * $Date: 2002/05/14 16:27:05 $ * * ==================================================================== * @@ -156,7 +156,7 @@ * class comments of the implementation class. * * @author Craig R. McClanahan - * @version $Revision: 1.19 $ $Date: 2002/01/08 22:21:01 $ + * @version $Revision: 1.20 $ $Date: 2002/05/14 16:27:05 $ */ public abstract class ContainerBase @@ -1155,6 +1155,10 @@ if (started) throw new LifecycleException (sm.getString("containerBase.alreadyStarted", logName())); + + // Notify our interested LifecycleListeners + lifecycle.fireLifecycleEvent(BEFORE_START_EVENT, null); + addDefaultMapper(this.mapperClass); started = true; @@ -1193,6 +1197,9 @@ // Notify our interested LifecycleListeners lifecycle.fireLifecycleEvent(START_EVENT, null); + // Notify our interested LifecycleListeners + lifecycle.fireLifecycleEvent(AFTER_START_EVENT, null); + } @@ -1211,6 +1218,9 @@ (sm.getString("containerBase.notStarted", logName())); // Notify our interested LifecycleListeners + lifecycle.fireLifecycleEvent(BEFORE_STOP_EVENT, null); + + // Notify our interested LifecycleListeners lifecycle.fireLifecycleEvent(STOP_EVENT, null); started = false; @@ -1252,6 +1262,9 @@ if ((loader != null) && (loader instanceof Lifecycle)) { ((Lifecycle) loader).stop(); } + + // Notify our interested LifecycleListeners + lifecycle.fireLifecycleEvent(AFTER_STOP_EVENT, null); } 1.106 +17 -4 jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/StandardContext.java Index: StandardContext.java =================================================================== RCS file: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/StandardContext.java,v retrieving revision 1.105 retrieving revision 1.106 diff -u -r1.105 -r1.106 --- StandardContext.java 30 Apr 2002 21:13:37 -0000 1.105 +++ StandardContext.java 14 May 2002 16:27:05 -0000 1.106 @@ -1,7 +1,7 @@ /* - * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/StandardContext.java,v 1.105 2002/04/30 21:13:37 remm Exp $ - * $Revision: 1.105 $ - * $Date: 2002/04/30 21:13:37 $ + * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/StandardContext.java,v 1.106 2002/05/14 16:27:05 remm Exp $ + * $Revision: 1.106 $ + * $Date: 2002/05/14 16:27:05 $ * * ==================================================================== * @@ -147,7 +147,7 @@ * * @author Craig R. McClanahan * @author Remy Maucherat - * @version $Revision: 1.105 $ $Date: 2002/04/30 21:13:37 $ + * @version $Revision: 1.106 $ $Date: 2002/05/14 16:27:05 $ */ public class StandardContext @@ -3317,6 +3317,10 @@ if (debug >= 1) log("Starting"); + + // Notify our interested LifecycleListeners + lifecycle.fireLifecycleEvent(BEFORE_START_EVENT, null); + if (debug >= 1) log("Processing start(), current available=" + getAvailable()); setAvailable(false); @@ -3499,6 +3503,9 @@ setAvailable(false); } + // Notify our interested LifecycleListeners + lifecycle.fireLifecycleEvent(AFTER_START_EVENT, null); + } @@ -3517,6 +3524,9 @@ if (debug >= 1) log("Stopping"); + // Notify our interested LifecycleListeners + lifecycle.fireLifecycleEvent(BEFORE_STOP_EVENT, null); + // Mark this application as unavailable while we shut down setAvailable(false); @@ -3606,6 +3616,9 @@ unbindThread(oldCCL); } + + // Notify our interested LifecycleListeners + lifecycle.fireLifecycleEvent(AFTER_STOP_EVENT, null); if (debug >= 1) log("Stopping complete"); 1.7 +16 -3 jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/StandardPipeline.java Index: StandardPipeline.java =================================================================== RCS file: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/StandardPipeline.java,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- StandardPipeline.java 4 Apr 2002 15:02:13 -0000 1.6 +++ StandardPipeline.java 14 May 2002 16:27:05 -0000 1.7 @@ -1,7 +1,7 @@ /* - * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/StandardPipeline.java,v 1.6 2002/04/04 15:02:13 remm Exp $ - * $Revision: 1.6 $ - * $Date: 2002/04/04 15:02:13 $ + * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/StandardPipeline.java,v 1.7 2002/05/14 16:27:05 remm Exp $ + * $Revision: 1.7 $ + * $Date: 2002/05/14 16:27:05 $ * * ==================================================================== * @@ -270,6 +270,10 @@ if (started) throw new LifecycleException (sm.getString("standardPipeline.alreadyStarted")); + + // Notify our interested LifecycleListeners + lifecycle.fireLifecycleEvent(BEFORE_START_EVENT, null); + started = true; // Start the Valves in our pipeline (including the basic), if any @@ -283,6 +287,9 @@ // Notify our interested LifecycleListeners lifecycle.fireLifecycleEvent(START_EVENT, null); + // Notify our interested LifecycleListeners + lifecycle.fireLifecycleEvent(AFTER_START_EVENT, null); + } @@ -301,6 +308,9 @@ (sm.getString("standardPipeline.notStarted")); // Notify our interested LifecycleListeners + lifecycle.fireLifecycleEvent(BEFORE_STOP_EVENT, null); + + // Notify our interested LifecycleListeners lifecycle.fireLifecycleEvent(STOP_EVENT, null); started = false; @@ -311,6 +321,9 @@ if (valves[i] instanceof Lifecycle) ((Lifecycle) valves[i]).stop(); } + + // Notify our interested LifecycleListeners + lifecycle.fireLifecycleEvent(AFTER_STOP_EVENT, null); } 1.24 +17 -4 jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/StandardServer.java Index: StandardServer.java =================================================================== RCS file: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/StandardServer.java,v retrieving revision 1.23 retrieving revision 1.24 diff -u -r1.23 -r1.24 --- StandardServer.java 3 May 2002 02:19:23 -0000 1.23 +++ StandardServer.java 14 May 2002 16:27:05 -0000 1.24 @@ -1,7 +1,7 @@ /* - * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/StandardServer.java,v 1.23 2002/05/03 02:19:23 craigmcc Exp $ - * $Revision: 1.23 $ - * $Date: 2002/05/03 02:19:23 $ + * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/StandardServer.java,v 1.24 2002/05/14 16:27:05 remm Exp $ + * $Revision: 1.24 $ + * $Date: 2002/05/14 16:27:05 $ * * ==================================================================== * @@ -93,7 +93,7 @@ * (but not required) when deploying and starting Catalina. * * @author Craig R. McClanahan - * @version $Revision: 1.23 $ $Date: 2002/05/03 02:19:23 $ + * @version $Revision: 1.24 $ $Date: 2002/05/14 16:27:05 $ */ public final class StandardServer @@ -694,6 +694,9 @@ throw new LifecycleException (sm.getString("standardServer.start.started")); + // Notify our interested LifecycleListeners + lifecycle.fireLifecycleEvent(BEFORE_START_EVENT, null); + lifecycle.fireLifecycleEvent(START_EVENT, null); started = true; @@ -705,6 +708,9 @@ } } + // Notify our interested LifecycleListeners + lifecycle.fireLifecycleEvent(AFTER_START_EVENT, null); + } @@ -724,6 +730,10 @@ if (!started) throw new LifecycleException (sm.getString("standardServer.stop.notStarted")); + + // Notify our interested LifecycleListeners + lifecycle.fireLifecycleEvent(BEFORE_STOP_EVENT, null); + lifecycle.fireLifecycleEvent(STOP_EVENT, null); started = false; @@ -732,6 +742,9 @@ if (services[i] instanceof Lifecycle) ((Lifecycle) services[i]).stop(); } + + // Notify our interested LifecycleListeners + lifecycle.fireLifecycleEvent(AFTER_STOP_EVENT, null); } 1.10 +18 -4 jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/StandardService.java Index: StandardService.java =================================================================== RCS file: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/StandardService.java,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- StandardService.java 6 Mar 2002 06:49:11 -0000 1.9 +++ StandardService.java 14 May 2002 16:27:05 -0000 1.10 @@ -1,7 +1,7 @@ /* - * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/StandardService.java,v 1.9 2002/03/06 06:49:11 craigmcc Exp $ - * $Revision: 1.9 $ - * $Date: 2002/03/06 06:49:11 $ + * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/StandardService.java,v 1.10 2002/05/14 16:27:05 remm Exp $ + * $Revision: 1.10 $ + * $Date: 2002/05/14 16:27:05 $ * * ==================================================================== * @@ -86,7 +86,7 @@ * not required. * * @author Craig R. McClanahan - * @version $Revision: 1.9 $ $Date: 2002/03/06 06:49:11 $ + * @version $Revision: 1.10 $ $Date: 2002/05/14 16:27:05 $ */ public final class StandardService @@ -484,6 +484,9 @@ (sm.getString("standardService.start.started")); } + // Notify our interested LifecycleListeners + lifecycle.fireLifecycleEvent(BEFORE_START_EVENT, null); + System.out.println (sm.getString("standardService.start.name", this.name)); lifecycle.fireLifecycleEvent(START_EVENT, null); @@ -506,6 +509,9 @@ } } + // Notify our interested LifecycleListeners + lifecycle.fireLifecycleEvent(AFTER_START_EVENT, null); + } @@ -526,6 +532,10 @@ throw new LifecycleException (sm.getString("standardService.stop.notStarted")); } + + // Notify our interested LifecycleListeners + lifecycle.fireLifecycleEvent(BEFORE_STOP_EVENT, null); + lifecycle.fireLifecycleEvent(STOP_EVENT, null); System.out.println @@ -549,7 +559,11 @@ } } + // Notify our interested LifecycleListeners + lifecycle.fireLifecycleEvent(AFTER_STOP_EVENT, null); + } + /** * Invoke a pre-startup initialization. This is used to allow connectors
-- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>