tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r...@apache.org
Subject cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina Container.java
Date Thu, 22 May 2003 23:03:13 GMT
remm        2003/05/22 16:03:13

  Modified:    catalina/src/share/org/apache/catalina Container.java
  Log:
  - Refactor the host deployer, session manager, webapp reloading threads
    into one (potentially) thread at the engine level.
  - The thread code is in StandardEngine, but can be refactored into
    StandardServer, in case we want to be able to have one thread for the whole
    server. The main adavantage of putting the code in container is that additional
    threads can be associated to branches of the container tree (ex: associate
    one thread per host, one thread for a specific context, etc ...).
  - The container's CL (if present) will be set as the context classloader before
    invoking the execute method, and will be restored afterwards.
  - I couldn't come up with good neams for the new field and the thread name.
    Can you help ?
  
  Revision  Changes    Path
  1.4       +34 -4     jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/Container.java
  
  Index: Container.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/Container.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- Container.java	19 May 2003 22:45:05 -0000	1.3
  +++ Container.java	22 May 2003 23:03:13 -0000	1.4
  @@ -253,6 +253,28 @@
   
   
       /**
  +     * Get the delay between the invocation of the execute method on
  +     * this container and its children. Child containers will not be invoked
  +     * if their delay value is not negative (which would mean they are using 
  +     * their own thread). Setting this to a positive value will cause 
  +     * a thread to be spawn. After waiting the specified amount of time, 
  +     * the thread will invoke the executePeriodic method on this container 
  +     * and all its children.
  +     */
  +    public int getExecuteDelay();
  +
  +
  +    /**
  +     * Set the delay between the invocation of the execute method on this
  +     * container and its children.
  +     * 
  +     * @param delay The delay in seconds between the invocation of execute 
  +     *              methods
  +     */
  +    public void setExecuteDelay(int delay);
  +
  +
  +    /**
        * Return a name string (suitable for use by humans) that describes this
        * Container.  Within the set of child containers belonging to a particular
        * parent, Container names must be unique.
  @@ -345,6 +367,14 @@
   
   
       // --------------------------------------------------------- Public Methods
  +
  +
  +    /**
  +     * Execute a periodic task, such as reloading, etc. This method will be
  +     * invoked inside the classloading context of this container. Unexpected
  +     * throwables will be caught and logged.
  +     */
  +    public void execute();
   
   
       /**
  
  
  

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


Mime
View raw message