remm 02/02/19 17:01:34 Modified: catalina/src/share/org/apache/catalina/startup BootstrapService.java Log: - Add an optional dependency on commons-daemon. - BootstrapService (which I don't plan to rename because of script compatibility concerns) will not be compiled if commons-daemon is not present. - BootstrapService now implements the new Daemon interface (which is very similar to the Service interface used before). - Note: I didn't test the service intalled by the installer, so it may fail. - Remove older service code. Revision Changes Path 1.14 +23 -13 jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/startup/BootstrapService.java Index: BootstrapService.java =================================================================== RCS file: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/startup/BootstrapService.java,v retrieving revision 1.13 retrieving revision 1.14 diff -u -r1.13 -r1.14 --- BootstrapService.java 18 Feb 2002 19:59:28 -0000 1.13 +++ BootstrapService.java 20 Feb 2002 01:01:34 -0000 1.14 @@ -1,7 +1,7 @@ /* - * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/startup/BootstrapService.java,v 1.13 2002/02/18 19:59:28 remm Exp $ - * $Revision: 1.13 $ - * $Date: 2002/02/18 19:59:28 $ + * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/startup/BootstrapService.java,v 1.14 2002/02/20 01:01:34 remm Exp $ + * $Revision: 1.14 $ + * $Date: 2002/02/20 01:01:34 $ * * ==================================================================== * @@ -71,8 +71,8 @@ import java.net.MalformedURLException; import java.net.URL; import java.util.ArrayList; -import org.apache.service.Service; -import org.apache.service.ServiceController; +import org.apache.commons.daemon.Daemon; +import org.apache.commons.daemon.DaemonContext; import org.apache.catalina.loader.Extension; import org.apache.catalina.loader.StandardClassLoader; @@ -86,11 +86,11 @@ * * @author Craig R. McClanahan * @author Remy Maucherat - * @version $Revision: 1.13 $ $Date: 2002/02/18 19:59:28 $ + * @version $Revision: 1.14 $ $Date: 2002/02/20 01:01:34 $ */ public final class BootstrapService - implements Service { + implements Daemon { // ------------------------------------------------------- Static Variables @@ -99,7 +99,7 @@ /** * Service object used by main. */ - private static Service service = null; + private static Daemon service = null; /** @@ -120,8 +120,8 @@ /** * Load the Catalina Service. */ - public void load(ServiceController controller, String arguments[]) - throws Throwable { + public void init(DaemonContext context) + throws Exception { log("Create Catalina server"); @@ -211,7 +211,7 @@ * Start the Catalina Service. */ public void start() - throws Throwable { + throws Exception { log("Starting service"); String methodName = "start"; @@ -226,7 +226,7 @@ * Stop the Catalina Service. */ public void stop() - throws Throwable { + throws Exception { log("Stopping service"); String methodName = "stop"; @@ -237,6 +237,16 @@ } + /** + * Destroy the Catalina Service. + */ + public void destroy() { + + // FIXME + + } + + // ----------------------------------------------------------- Main Program @@ -256,7 +266,7 @@ if (service == null) { service = new BootstrapService(); try { - service.load(null, args); + service.init(null); } catch (Throwable t) { t.printStackTrace(); return;
-- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>