Apache Tomcat Configuration Reference (6.0.45) - The Executor (thread pool)
Author: Filip Hanik

| # Apache Tomcat 6.0 Version 6.0.45, Feb 1 2016 |

Links Docs Home Config Ref. Home Top Level Elements Server Service Executors Executor Connectors HTTP AJP Containers Context Engine Host Cluster Nested Components Global Resources Listeners Loader Manager Realm Resources Valve Cluster Elements Cluster Manager Channel Channel/Membership Channel/Sender Channel/Receiver Channel/Interceptor Valve Deployer ClusterListener web.xml Filter Other System properties | # Apache Tomcat Configuration Reference ## The Executor (thread pool)
Table of Contents
Introduction Attributes Common Attributes Standard Implementation
Introduction
The Executor represents a thread pool that can be shared between components in Tomcat. Historically there has been a thread pool per connector created but this allows you to share a thread pool, between (primarly) connector but also other components when those get configured to support executors The executor has to implement the `org.apache.catalina.Executor` interface. The executor is a nested element to the Service element. And in order for it to be picked up by the connectors, the Executor element has to appear prior to the Connector element in server.xml
Attributes
> Common Attributes
> > All implementations of Executor support the following attributes:
> > Attribute | Description
> > --- | ---
> > `className` | The class of the implementation. The implementation has to implement the `org.apache.catalina.Executor` interface. This interface ensures that the object can be referenced through its `name` attribute and that implements Lifecycle, so that it can be started and stopped with the container. The default value for the className is `org.apache.catalina.core.StandardThreadExecutor`
> > `name` | The name used to reference this pool in other places in server.xml. The name is required and must be unique.
> Standard Implementation
> > The default implementation supports the following attributes:
> > Attribute | Description
> > --- | ---
> > `threadPriority` | (int) The thread priority for threads in the executor, the default is `5` (the value of the `Thread.NORM_PRIORITY` constant)
> > `daemon` | (boolean) Whether the threads should be daemon threads or not, the default is `true`
> > `namePrefix` | (String) The name prefix for each thread created by the executor. The thread name for an individual thread will be `namePrefix+threadNumber`
> > `maxThreads` | (int) The max number of active threads in this pool, default is `200`
> > `minSpareThreads` | (int) The minimum number of threads always kept alive, default is `25`
> > `maxIdleTime` | (int) The number of milliseconds before an idle thread shutsdown, unless the number of active threads are less or equal to minSpareThreads. Default value is `60000`(1 minute)
> > `maxQueueSize` | (int) The maximum number of runnable tasks that can queue up awaiting execution before we reject them. Default value is `Integer.MAX_VALUE`
Copyright © 1999-2016, Apache Software Foundation