tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cos...@apache.org
Subject cvs commit: jakarta-tomcat-catalina/webapps/admin/WEB-INF/classes/org/apache/webapp/admin ApplicationServlet.java
Date Wed, 20 Nov 2002 00:12:58 GMT
costin      2002/11/19 16:12:58

  Modified:    webapps/admin/WEB-INF/classes/org/apache/webapp/admin
                        ApplicationServlet.java
  Log:
  I hope it won't break anything - moved the initialization in a background
  thread, to reduce the server startup time.
  
  It should be changed back when ( if ) the generic 'background context loading'
  is ever implemented.
  
  Revision  Changes    Path
  1.2       +17 -11    jakarta-tomcat-catalina/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/ApplicationServlet.java
  
  Index: ApplicationServlet.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-catalina/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/ApplicationServlet.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- ApplicationServlet.java	18 Jul 2002 16:48:21 -0000	1.1
  +++ ApplicationServlet.java	20 Nov 2002 00:12:58 -0000	1.2
  @@ -82,7 +82,7 @@
    * @version $Revision$ $Date$
    */
   
  -public class ApplicationServlet extends ActionServlet {
  +public class ApplicationServlet extends ActionServlet implements Runnable {
   
   
       // ----------------------------------------------------- Manifest Constants
  @@ -147,13 +147,19 @@
        * @exception ServletException if an initialization error occurs.
        */
       public void init() throws javax.servlet.ServletException {
  +        new Thread(this).start();
  +    }
   
  -        // Perform normal superclass initialization
  -        super.init();
  -
  -        // Perform initialization specific to this application
  -        initApplicationLocales();
  -
  +    public void run() {
  +        try {
  +            // Perform normal superclass initialization
  +            super.init();
  +            
  +            // Perform initialization specific to this application
  +            initApplicationLocales();
  +        } catch( Exception ex ) {
  +            ex.printStackTrace();
  +        }
       }
   
   
  
  
  

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


Mime
View raw message