users@glassfish.java.net

Re: AMX code snippets for httpService configuration

From: <glassfish_at_javadesktop.org>
Date: Wed, 26 Mar 2008 08:17:47 PST

thread count is in the <request-processing> element which is under <http-service>.

<!ELEMENT http-service
    (access-log?, http-listener+, virtual-server+, request-processing?,
    keep-alive?, connection-pool?, http-protocol?, http-file-cache?,
    property*)>

 <!ATTLIST request-processing
    thread-count CDATA "128"
    initial-thread-count CDATA "48"
    thread-increment CDATA "10"
    request-timeout-in-seconds CDATA "30"
    header-buffer-length-in-bytes CDATA "4096">

You also need to know the name of the config. Here is the code snippet assuming the name of the config is the default 'server-config'

DomainRoot dRoot = ASConnection.getDomainRoot();
Map<String,ConfigConfig> cmap = (Map) dRoot.getConfigConfigMap();
ConfigConfig config = cmap.get("server-config");
RequestProcessingConfig rp = config.getHTTPServiceConfig().getRequestProcessingConfig();
String count = rp.getThreadCount();
String initial = rp.getInitialThreadCount();
String increment = rp.getThreadIncrement();
String timeout = rp.getRequestTimeoutInSeconds();
String buffer = rp.getHeaderBufferLengthInBytes();

Hope this help.
Anissa.
[Message sent by forum member 'anilam' (anilam)]

http://forums.java.net/jive/thread.jspa?messageID=265964