On 19.02.2009 19:39, Caldarale, Charles R wrote:
From: Rainer Jung [mailto:[email protected]]
Subject: Re: mod_jk pool/thread/configure questions

Try maxSpareThreads and minSpareThreads.

Do those still work without an Executor?  There are no get/set methods for 
those attributes in AjpProtocol.java in 6.0.18.

It does work for the AJP connector when not using APR. His stacks show he is using APR however.

The way the attribute flows should be like this:


org.apache.catalina.connector.Connector:

            } else if ("AJP/1.3".equals(protocol)) {
                setProtocolHandlerClassName
                    ("org.apache.jk.server.JkCoyoteHandler");


org.apache.jk.server.JkCoyoteHandler

    public void setProperty( String name, String value ) {
        if( log.isTraceEnabled())
            log.trace("setProperty " + name + " " + value );
        getJkMain().setProperty( name, value );
        properties.put( name, value );
    }


org.apache.jk.server.JkMain

forwards properties via the following mapping:

        replacements.put("port","channelSocket.port");
        replacements.put("maxThreads", "channelSocket.maxThreads");
replacements.put("minSpareThreads", "channelSocket.minSpareThreads"); replacements.put("maxSpareThreads", "channelSocket.maxSpareThreads");
...

and channelSocket is

modules.put("channelSocket", "org.apache.jk.common.ChannelSocket");


org.apache.jk.common.ChannelSocket

Example

    public void setMaxSpareThreads( int i ) {
if( log.isDebugEnabled()) log.debug("Setting maxSpareThreads " + i);
        tp.setMaxSpareThreads(i);
    }

and tp is

    ThreadPool tp=ThreadPool.createThreadPool(true);

with

import org.apache.tomcat.util.threads.ThreadPool;

Which is the traditional thread pool implementing the minSpare and maxSpare feature.

I hope my analysis is right, but at least it is backed by testing :)

Regards,

Rainer

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to