cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/startup Bootstrap.java Catalina.java

2004-02-25 Thread remm
remm2004/02/25 14:05:43

  Modified:catalina/src/share/org/apache/catalina/startup
Bootstrap.java Catalina.java
  Log:
  - Fix bug 27127: Shutdown doesn't work with custom server port and non-default 
config file.
  
  Revision  ChangesPath
  1.15  +26 -2 
jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/startup/Bootstrap.java
  
  Index: Bootstrap.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/startup/Bootstrap.java,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- Bootstrap.java19 Nov 2003 18:18:51 -  1.14
  +++ Bootstrap.java25 Feb 2004 22:05:43 -  1.15
  @@ -324,6 +324,30 @@
   }
   
   
  +   /**
  + * Stop the standlone server.
  + */
  +public void stopServer(String[] arguments)
  +throws Exception {
  +
  +Object param[];
  +Class paramTypes[];
  +if (arguments==null || arguments.length==0) {
  +paramTypes = null;
  +param = null;
  +} else {
  +paramTypes = new Class[1];
  +paramTypes[0] = arguments.getClass();
  +param = new Object[1];
  +param[0] = arguments;
  +}
  +Method method = 
  +catalinaDaemon.getClass().getMethod(stopServer, paramTypes);
  +method.invoke(catalinaDaemon, param);
  +
  +}
  +
  +
   /**
* Set flag.
*/
  @@ -397,7 +421,7 @@
   daemon.load(args);
   daemon.start();
   } else if (command.equals(stop)) {
  -daemon.stopServer();
  +daemon.stopServer(args);
   }
   } catch (Throwable t) {
   t.printStackTrace();
  
  
  
  1.26  +12 -4 
jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/startup/Catalina.java
  
  Index: Catalina.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/startup/Catalina.java,v
  retrieving revision 1.25
  retrieving revision 1.26
  diff -u -r1.25 -r1.26
  --- Catalina.java 5 Feb 2004 05:27:31 -   1.25
  +++ Catalina.java 25 Feb 2004 22:05:43 -  1.26
  @@ -423,6 +423,14 @@
   
   
   public void stopServer() {
  +stopServer(null);
  +}
  +
  +public void stopServer(String[] arguments) {
  +
  +if (arguments != null) {
  +arguments(arguments);
  +}
   
   if( server == null ) {
   // Create and execute our Digester
  
  
  

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/startup Bootstrap.java Catalina.java

2002-10-26 Thread remm
remm2002/10/26 05:29:56

  Modified:catalina/src/share/org/apache/catalina/startup
Bootstrap.java Catalina.java
  Log:
  - Fix service functionality.
  
  Revision  ChangesPath
  1.7   +7 -4  
jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/startup/Bootstrap.java
  
  Index: Bootstrap.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/startup/Bootstrap.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- Bootstrap.java24 Oct 2002 22:06:04 -  1.6
  +++ Bootstrap.java26 Oct 2002 12:29:56 -  1.7
   -86,6 +86,7 
* class path and therefore not visible to application level classes.
*
* author Craig R. McClanahan
  + * author Remy Maucherat
* version $Revision$ $Date$
*/
   
   -358,9 +359,11 
   try {
   String command = args[0];
   if (command.equals(startd)) {
  +args[0] = start;
   daemon.load(args);
   daemon.start();
   } else if (command.equals(stopd)) {
  +args[0] = stop;
   daemon.stop();
   } else if (command.equals(start)) {
   daemon.setAwait(true);
  
  
  
  1.9   +5 -4  
jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/startup/Catalina.java
  
  Index: Catalina.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/startup/Catalina.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- Catalina.java 24 Oct 2002 22:06:04 -  1.8
  +++ Catalina.java 26 Oct 2002 12:29:56 -  1.9
   -98,6 +98,7 
* /u
*
* author Craig R. McClanahan
  + * author Remy Maucherat
* version $Revision$ $Date$
*/
   
  
  
  

--
To unsubscribe, e-mail:   mailto:tomcat-dev-unsubscribe;jakarta.apache.org
For additional commands, e-mail: mailto:tomcat-dev-help;jakarta.apache.org




cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/startup Bootstrap.java Catalina.java BootstrapService.java CatalinaService.java

2002-10-24 Thread remm
remm2002/10/24 15:06:04

  Modified:catalina/src/share/org/apache/catalina/startup
Bootstrap.java Catalina.java
  Removed: catalina/src/share/org/apache/catalina/startup
BootstrapService.java CatalinaService.java
  Log:
  - Remove the *Service classes.
  - The basic functionality appears to be working. The Windows service
will need to be tested and updated (tomorrow).
  
  Revision  ChangesPath
  1.6   +243 -112  
jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/startup/Bootstrap.java
  
  Index: Bootstrap.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/startup/Bootstrap.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- Bootstrap.java24 Oct 2002 13:53:22 -  1.5
  +++ Bootstrap.java24 Oct 2002 22:06:04 -  1.6
   -91,76 +91,54 
   
   public final class Bootstrap {
   
  +
  +// -- Constants
  +
  +
  +protected static final String CATALINA_TOKEN = ${catalina.home};
  +
  +
  +// --- Static Variables
  +
  +
  +/**
  + * Daemon object used by main.
  + */
  +private static Bootstrap daemon = null;
  +
  +
  +// -- Variables
  +
  +
   /**
* Debugging detail level for processing the startup.
*/
   protected int debug = 0;
  -protected String args[];
   
  -// Construct the class loaders we will need
  +
  +/**
  + * Daemon reference.
  + */
  +private Object catalinaDaemon = null;
  +
  +
   protected ClassLoader commonLoader = null;
   protected ClassLoader catalinaLoader = null;
   protected ClassLoader sharedLoader = null;
   
  -protected static final String CATALINA_TOKEN = ${catalina.home};
  -
  -public void setDebug( int debug ) {
  -this.debug=debug;
  -}
  -
  -public void setArgs(String args[] ) {
  -this.args=args;
  -}
   
  +//  Private Methods
   
  -// --- Main Program
   
  -
  -public void initClassLoaders() {
  +private void initClassLoaders() {
   try {
  -
  -/*
  -File unpacked[] = new File[1];
  -File packed[] = new File[1];
  -File packed2[] = new File[2];
  -ClassLoaderFactory.setDebug(debug);
  -
  -unpacked[0] = new File(getCatalinaHome(),
  -   common + File.separator + classes);
  -packed2[0] = new File(getCatalinaHome(),
  -  common + File.separator + endorsed);
  -packed2[1] = new File(getCatalinaHome(),
  -  common + File.separator + lib);
  -commonLoader =
  -ClassLoaderFactory.createClassLoader(unpacked, packed2, null);
  -
  -unpacked[0] = new File(getCatalinaHome(),
  -   server + File.separator + classes);
  -packed[0] = new File(getCatalinaHome(),
  - server + File.separator + lib);
  -catalinaLoader =
  -ClassLoaderFactory.createClassLoader(unpacked, packed,
  - commonLoader);
  -
  -unpacked[0] = new File(getCatalinaBase(),
  -   shared + File.separator + classes);
  -packed[0] = new File(getCatalinaBase(),
  - shared + File.separator + lib);
  -sharedLoader =
  -ClassLoaderFactory.createClassLoader(unpacked, packed,
  - commonLoader);
  -*/
  -
   ClassLoaderFactory.setDebug(debug);
   commonLoader = createClassLoader(common, null);
   catalinaLoader = createClassLoader(server, commonLoader);
   sharedLoader = createClassLoader(shared, commonLoader);
  -
   } catch (Throwable t) {
  -
   log(Class loader creation threw exception, t);
   System.exit(1);
  -
   }
   }
   
   -203,84 +181,237 
   }
   
   
  -// --- Main Program
  +/**
  + * Initialize daemon.
  + */
  +private void init()
  +throws Exception {
   
  -public void execute() {
  -// Set the debug flag appropriately
  -for (int i = 0; i  args.length; i++)  {
  -if (-debug.equals(args[i]))
  -setDebug( 1 );
  -}
  -
  -