alvinalexander.com | career | drupal | java | mac | mysql | perl | scala | uml | unix  

Tomcat example source code file (executor.xml)

This example Tomcat source code file (executor.xml) is included in the DevDaily.com "Java Source Code Warehouse" project. The intent of this project is to help you "Learn Java by Example" TM.

Java - Tomcat tags/keywords

apache, asf, asf, attributes, executor, implementation, license, license, see, system, the, the, you, you

The Tomcat executor.xml source code

<?xml version="1.0"?>
<!--
  Licensed to the Apache Software Foundation (ASF) under one or more
  contributor license agreements.  See the NOTICE file distributed with
  this work for additional information regarding copyright ownership.
  The ASF licenses this file to You under the Apache License, Version 2.0
  (the "License"); you may not use this file except in compliance with
  the License.  You may obtain a copy of the License at

      http://www.apache.org/licenses/LICENSE-2.0

  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.
-->
<!DOCTYPE document [
  <!ENTITY project SYSTEM "project.xml">
]>
<document url="executor.html">

  &project;

  <properties>
    <author email="fhanik@apache.org">Filip Hanik
    <title>The Executor (thread pool)
  </properties>

<body>


<section name="Introduction">

  <p>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</p>


  <p>The executor has to implement the org.apache.catalina.Executor interface.

<p>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</p> </section> <section name="Attributes"> <subsection name="Common Attributes"> <p>All implementations of Executor support the following attributes:</p> <attributes> <attribute name="className" required="false"> <p>The class of the implementation. The implementation has to implement the <code>org.apache.catalina.Executor interface. This interface ensures that the object can be referenced through its <code>name attribute and that implements Lifecycle, so that it can be started and stopped with the container. The default value for the className is <code>org.apache.catalina.core.StandardThreadExecutor

</attribute> <attribute name="name" required="true"> <p>The name used to reference this pool in other places in server.xml. The name is required and must be unique.</p> </attribute> </attributes> </subsection> <subsection name="Standard Implementation"> <p> The default implementation supports the following attributes:</p> <attributes> <attribute name="threadPriority" required="false"> <p>(int) The thread priority for threads in the executor, the default is Thread.NORM_PRIORITY

</attribute> <attribute name="daemon" required="false"> <p>(boolean) Whether the threads should be daemon threads or not, the default is true

</attribute> <attribute name="namePrefix" required="false"> <p>(String) The name prefix for each thread created by the executor. The thread name for an individual thread will be <code>namePrefix+threadNumber

</attribute> <attribute name="maxThreads" required="false"> <p>(int) The max number of active threads in this pool, default is 200

</attribute> <attribute name="minSpareThreads" required="false"> <p>(int) The minimum number of threads always kept alive, default is 25

</attribute> <attribute name="maxIdleTime" required="false"> <p>(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 <code>60000(1 minute)

</attribute> </attributes> </subsection> </section> </body> </document>

Other Tomcat examples (source code examples)

Here is a short list of links related to this Tomcat executor.xml source code file:

... this post is sponsored by my books ...

#1 New Release!

FP Best Seller

 

new blog posts

 

Copyright 1998-2021 Alvin Alexander, alvinalexander.com
All Rights Reserved.

A percentage of advertising revenue from
pages under the /java/jwarehouse URI on this website is
paid back to open source projects.