在 Karaf 中增加 Jetty ThreadPool 的大小 [英] Increasing Jetty ThreadPool size in Karaf

查看:24
本文介绍了在 Karaf 中增加 Jetty ThreadPool 的大小的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

尝试增加在 karaf 中运行的嵌入式码头中的线程数.我使用以下属性更改 jetty.xml,如 POST .

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 参考外部配置(Jetty).但我无法增加/减少服务器的默认线程大小.那么我错过了什么?

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 ThreadPool 的大小的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆