* Creates threadpool module. Resolves #2130 Signed-off-by: WalkerWatch <ctwalker@gmail.com> * Fixed formatting Signed-off-by: WalkerWatch <ctwalker@gmail.com> * Made requested changes. Signed-off-by: WalkerWatch <ctwalker@gmail.com> * Additional PR changes. Signed-off-by: WalkerWatch <ctwalker@gmail.com> * Udated jetty-threadpool.xml Signed-off-by: WalkerWatch <ctwalker@gmail.com>
This commit is contained in:
parent
fe2be81783
commit
0345820526
|
@ -350,7 +350,7 @@
|
|||
<arguments>
|
||||
<argument>jetty.home=${assembly-directory}</argument>
|
||||
<argument>jetty.base=${assembly-directory}/demo-base</argument>
|
||||
<argument>--add-to-startd=server,continuation,deploy,websocket,ext,resources,client,annotations,jndi,servlets,jsp,jstl,http,https</argument>
|
||||
<argument>--add-to-startd=server,continuation,deploy,websocket,ext,resources,client,annotations,jndi,servlets,jsp,jstl,http,https,threadpool</argument>
|
||||
</arguments>
|
||||
</configuration>
|
||||
<goals>
|
||||
|
|
|
@ -0,0 +1,27 @@
|
|||
<?xml version="1.0"?>
|
||||
<!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "http://www.eclipse.org/jetty/configure_9_3.dtd">
|
||||
|
||||
<Configure id="threadPool" class="org.eclipse.jetty.util.thread.QueuedThreadPool">
|
||||
|
||||
<!-- =========================================================== -->
|
||||
<!-- Configure the Server Thread Pool. -->
|
||||
<!-- The server holds a common thread pool which is used by -->
|
||||
<!-- default as the executor used by all connectors and servlet -->
|
||||
<!-- dispatches. -->
|
||||
<!-- -->
|
||||
<!-- Configuring a fixed thread pool is vital to controlling the -->
|
||||
<!-- maximal memory footprint of the server and is a key tuning -->
|
||||
<!-- parameter for tuning. In an application that rarely blocks -->
|
||||
<!-- then maximal threads may be close to the number of 5*CPUs. -->
|
||||
<!-- In an application that frequently blocks, then maximal -->
|
||||
<!-- threads should be set as high as possible given the memory -->
|
||||
<!-- available. -->
|
||||
<!-- -->
|
||||
<!-- Consult the javadoc of o.e.j.util.thread.QueuedThreadPool -->
|
||||
<!-- for all configuration that may be set here. -->
|
||||
<!-- =========================================================== -->
|
||||
<Set name="minThreads" type="int"><Property name="jetty.threadPool.minThreads" deprecated="threads.min" default="10"/></Set>
|
||||
<Set name="maxThreads" type="int"><Property name="jetty.threadPool.maxThreads" deprecated="threads.max" default="200"/></Set>
|
||||
<Set name="idleTimeout" type="int"><Property name="jetty.threadPool.idleTimeout" deprecated="threads.timeout" default="60000"/></Set>
|
||||
<Set name="detailedDump" type="boolean"><Property name="jetty.threadPool.detailedDump" default="false"/></Set>
|
||||
</Configure>
|
|
@ -25,32 +25,7 @@
|
|||
<!-- =============================================================== -->
|
||||
<Configure id="Server" class="org.eclipse.jetty.server.Server">
|
||||
|
||||
<!-- =========================================================== -->
|
||||
<!-- Configure the Server Thread Pool. -->
|
||||
<!-- The server holds a common thread pool which is used by -->
|
||||
<!-- default as the executor used by all connectors and servlet -->
|
||||
<!-- dispatches. -->
|
||||
<!-- -->
|
||||
<!-- Configuring a fixed thread pool is vital to controlling the -->
|
||||
<!-- maximal memory footprint of the server and is a key tuning -->
|
||||
<!-- parameter for tuning. In an application that rarely blocks -->
|
||||
<!-- then maximal threads may be close to the number of 5*CPUs. -->
|
||||
<!-- In an application that frequently blocks, then maximal -->
|
||||
<!-- threads should be set as high as possible given the memory -->
|
||||
<!-- available. -->
|
||||
<!-- -->
|
||||
<!-- Consult the javadoc of o.e.j.util.thread.QueuedThreadPool -->
|
||||
<!-- for all configuration that may be set here. -->
|
||||
<!-- =========================================================== -->
|
||||
<!-- uncomment to change type of threadpool
|
||||
<Arg name="threadpool"><New id="threadpool" class="org.eclipse.jetty.util.thread.QueuedThreadPool"/></Arg>
|
||||
-->
|
||||
<Get name="ThreadPool">
|
||||
<Set name="minThreads" type="int"><Property name="jetty.threadPool.minThreads" deprecated="threads.min" default="10"/></Set>
|
||||
<Set name="maxThreads" type="int"><Property name="jetty.threadPool.maxThreads" deprecated="threads.max" default="200"/></Set>
|
||||
<Set name="idleTimeout" type="int"><Property name="jetty.threadPool.idleTimeout" deprecated="threads.timeout" default="60000"/></Set>
|
||||
<Set name="detailedDump">false</Set>
|
||||
</Get>
|
||||
<Arg name="threadpool"><Ref refid="threadPool"/></Arg>
|
||||
|
||||
<!-- =========================================================== -->
|
||||
<!-- Add shared Scheduler instance -->
|
||||
|
|
|
@ -7,6 +7,9 @@ ext
|
|||
resources
|
||||
logging
|
||||
|
||||
[depend]
|
||||
threadpool
|
||||
|
||||
[lib]
|
||||
lib/servlet-api-3.1.jar
|
||||
lib/jetty-schemas-3.1.jar
|
||||
|
@ -20,16 +23,6 @@ lib/jetty-io-${jetty.version}.jar
|
|||
etc/jetty.xml
|
||||
|
||||
[ini-template]
|
||||
### ThreadPool configuration
|
||||
## Minimum number of threads
|
||||
# jetty.threadPool.minThreads=10
|
||||
|
||||
## Maximum number of threads
|
||||
# jetty.threadPool.maxThreads=200
|
||||
|
||||
## Thread idle timeout (in milliseconds)
|
||||
# jetty.threadPool.idleTimeout=60000
|
||||
|
||||
### Common HTTP configuration
|
||||
## Scheme to use to build URIs for secure redirects
|
||||
# jetty.httpConfig.secureScheme=https
|
||||
|
|
|
@ -0,0 +1,20 @@
|
|||
[description]
|
||||
Enables the Server thread pool.
|
||||
|
||||
[xml]
|
||||
etc/jetty-threadpool.xml
|
||||
|
||||
[ini-template]
|
||||
|
||||
### Server Thread Pool Configuration
|
||||
## Minimum Number of Threads
|
||||
#jetty.threadPool.minThreads=10
|
||||
|
||||
## Maximum Number of Threads
|
||||
#jetty.threadPool.maxThreads=200
|
||||
|
||||
## Thread Idle Timeout (in milliseconds)
|
||||
#jetty.threadPool.idleTimeout=60000
|
||||
|
||||
## Whether to Output a Detailed Dump
|
||||
#jetty.threadPool.detailedDump=false
|
Loading…
Reference in New Issue