avalon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hamm...@apache.org
Subject cvs commit: jakarta-avalon-apps/sevak/src/java/org/apache/avalon/apps/sevak/blocks/jetty JettySevak.java
Date Mon, 20 Jan 2003 23:50:21 GMT
hammant     2003/01/20 15:50:21

  Modified:    sevak/src/java/org/apache/avalon/apps/sevak/blocks/jetty
                        JettySevak.java
  Log:
  Threads patch from Ulrich Mayring
  
  Revision  Changes    Path
  1.13      +12 -6     jakarta-avalon-apps/sevak/src/java/org/apache/avalon/apps/sevak/blocks/jetty/JettySevak.java
  
  Index: JettySevak.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-apps/sevak/src/java/org/apache/avalon/apps/sevak/blocks/jetty/JettySevak.java,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- JettySevak.java	12 Jan 2003 14:17:40 -0000	1.12
  +++ JettySevak.java	20 Jan 2003 23:50:21 -0000	1.13
  @@ -44,6 +44,7 @@
    * @see <a href="http://jetty.mortbay.com/">Jetty Project Page</a>
    *
    * @author  Paul Hammant
  + * @author  Ulrich Mayring
    * @version 1.0
    */
   public class JettySevak extends AbstractLogEnabled implements Sevak, Startable, Contextualizable,
  @@ -51,12 +52,14 @@
   {
   
       private Server m_server;
  -    
  +
       /** Virtual host to bind the context to.  null implies all hosts are in context. */
       private String m_hostName;
  -    
  +
       private HashMap m_webapps = new HashMap();
       private int m_port;
  +    private int m_minThreads;
  +    private int m_maxThreads;
       private File m_sarRootDir;
       private ServiceManager m_serviceManager;
   
  @@ -96,6 +99,8 @@
       {
           m_hostName = configuration.getChild("hostname").getValue( null );
           m_port = configuration.getChild("port").getValueAsInteger(8080);
  +        m_minThreads = configuration.getChild("minthreads").getValueAsInteger(5);
  +        m_maxThreads = configuration.getChild("maxthreads").getValueAsInteger(250);
       }
   
       /**
  @@ -105,12 +110,10 @@
       public void initialize() throws Exception
       {
           m_server = new Server();
  -        final int minThreads = 5;
  -        final int maxThreads = 250;
           SocketListener listener = new SocketListener();
           listener.setPort(m_port);
  -        listener.setMinThreads(minThreads);
  -        listener.setMaxThreads(maxThreads);
  +        listener.setMinThreads(m_minThreads);
  +        listener.setMaxThreads(m_maxThreads);
           m_server.addListener(listener);
           PhoenixLogSink phoenixLogSink = new PhoenixLogSink();
           phoenixLogSink.enableLogging(getLogger());
  @@ -214,3 +217,6 @@
       }
   
   }
  +
  +
  +
  
  
  

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


Mime
View raw message