Re: [jetty-user] Jetty threadpool help

Jan Bartel <[email protected]> Tue, 28 Jun 2011 10:20:09 +1000
Newsgroups gmane.comp.java.jetty.support
Message-ID <[email protected]>
Shamik,

http://wiki.eclipse.org/Jetty/Howto/Configure_Connectors

At the bottom of the page, you'll see that one of the things that can be
configured on
a Connector is the ThreadPool instance to use.

cheers
Jan

On 28 June 2011 03:34, Shamik Bandopadhyay <[email protected]> wrote:

> Hi,
>
>    I'm new to Jetty, currently trying to understand different configuration
> parameters. One thing I'm interested to understand is how the threadpool
> option works for Jetty. Tomcat provides the flexibility to define a
> threadpool which will listen to a specific port. For e.g. in Tomcat
> server.xml, we can define:
>
>  <Executor name="tomcatThreadPool-dispatch" namePrefix="dispatch-exec-"
>         maxThreads="35" minSpareThreads="4"/>
>
> <Connector executor="tomcatThreadPool-dispatch"
>                port="19090" protocol="HTTP/1.1"
>                connectionTimeout="20000"
>                maxPostSize="20971520"
>                redirectPort="8443" />
>
> In Jetty, the standard configuration I've seen so far is :
>
> <Set name="ThreadPool">
>       <New class="org.mortbay.thread.QueuedThreadPool">
>         <Set name="minThreads">10</Set>
>         <Set name="maxThreads">40</Set>
>         <Set name="lowThreads">5</Set>
>         <Set name="SpawnOrShrinkAt">2</Set>
>       </New>
>     </Set>
>
> Just wanted to know if there's a way to create a threadpool dedicated to a
> port ?
>
> Any pointers will be appreciated.
>
> - Thanks
>