multithreading jboss 7,如何为http连接器设置线程池大小

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/7066946/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-10 01:15:53  来源:igfitidea点击:

jboss 7, how to set thread pool size for http connector

multithreadingthreadpooljboss7.x

提问by divya chekuri

In jboss7, how to set the thread pool size for the http and https connectors. I am using standalone.xml for setting changes. Can anyone help me.

在 jboss7 中,如何为 http 和 https 连接器设置线程池大小。我正在使用 standalone.xml 进行设置更改。谁能帮我。

Thanks in Advance.

提前致谢。

回答by rbaxter

You can add the max-connections attribute in standalone.xml like this:

您可以像这样在 standalone.xml 中添加 max-connections 属性:

[connector name="http" protocol="HTTP/1.1" scheme="http" socket-binding="http" max-connections="1000"/]

[connector name="http" protocol="HTTP/1.1" scheme="http" socket-binding="http" max-connections="1000"/]

回答by user613114

Define new thread factory and thread pool executor in your standalone xml. Refer to following site for more details: https://access.redhat.com/documentation/en-US/JBoss_Enterprise_Application_Platform/6.3/html/Administration_and_Configuration_Guide/sect-Connector_Configuration.html

在您的独立 xml 中定义新的线程工厂和线程池执行程序。有关更多详细信息,请参阅以下站点:https: //access.redhat.com/documentation/en-US/JBoss_Enterprise_Application_Platform/6.3/html/Administration_and_Configuration_Guide/sect-Connector_Configuration.html

I had similar issue, Refer to my SO question and answer.

我有类似的问题,请参阅我的SO 问题和答案

回答by bimal srivastava

You can configure it like this using maxThreadsparameter:

您可以使用maxThreads参数像这样配置它:

<subsystem xmlns="urn:jboss:domain:web:1.1" default-virtual-server="default-host" native="false" >

<connector name="http" protocol="HTTP/1.1" scheme="http" socket-binding="http" maxThreads="300" />

API documentation from jBoss site:

来自 jBoss 站点的 API 文档:

maxThread:(int) The max number of active threads in this pool, default is 200

maxThread:(int) 此池中最大活动线程数,默认为 200