Christopher Schultz schrieb:

Is the possibility to enforce thread quotas for applications (via
their <Connector>s) the main reason for the existence of <Executor>s?

What other reasons are there?

<Executors> can shed threads when they are not being used (see
maxIdleTime config param), while the stock thread pool never releases
connections after they are created.

Another reason for <Executors> is for them to be /shared/ by
<Connectors>. If you need to, say, listen for traffic across 10 ports
(okay, it's a bit contrived... maybe across 10 IPs on port 80), then
you'll need 10 <Connectors>. Rather than having to guess at which
webapps will be the most popular and allocate threads to each thread
pool accordingly, you can simply point them all to the same <Executor>
and then all <Connector>s share the thread pool.

Chris, thanks for these useful explanations. So, explicit <Executor>s
are useful for:

* having multiple <Connector>s share a common thread pool
* closing idle threads
* enforcing thread quotas for a specific <Connector> or group of
  <Connector>s
* maintaining common thread pool configuration

--
Michael Ludwig

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to