在Karaf中增加Jetty线程池的大小 [英] Increasing Jetty ThreadPool size in Karaf
本文介绍了在Karaf中增加Jetty线程池的大小的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
Trying to increase the number of threads in embedded jetty running in karaf .Im changing the jetty.xml with the following properties as described in the POST .
<Configure class="org.eclipse.jetty.server.Server">
<Call name="addConnector">
<Arg>
<New class="org.eclipse.jetty.util.thread.QueuedThreadPool">
<Set name="minThreads">10</Set>
<Set name="maxThreads">1000</Set>
</New>
</Arg>
</Call>
</Configure>
并且在karaf中还有 org.ops4j.pax.web.cfg 文件,具有以下属性:
And also having org.ops4j.pax.web.cfg file in karaf ,with below properties :
org.ops4j.pax.web.config.file=${karaf.home}/jetty.xml
以便参考外部配置(码头).但是我无法增加/减少服务器的默认线程大小.那我想念什么?
so to refer the external configurations (Jetty). But Im not able to increase/decrease the default thread size of the server . So What am I missing ?
推荐答案
使用最新的Pax-Web 4.2.0,可以通过配置管理员配置这些设置.可以使用以下三个新设置:
With the latest Pax-Web 4.2.0 it's possible to configure those settings via configuration admin. The following three new settings can be used:
org.ops4j.pax.web.server.maxThreads
org.ops4j.pax.web.server.minThreads
org.ops4j.pax.web.server.idleTimeout
这篇关于在Karaf中增加Jetty线程池的大小的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文