Java 将jboss的最大http线程数更改为6.1.0.Final
我想知道在Jboss 6.1.0.Final中哪里可以增加最大线程数。 我在谷歌上冲浪,但找不到确切的答案,上面提到的文件和位置也不正确。这是用的。您可以在中阅读详细信息 可以编写一个独立描述符,其名称为jboss-threads.xml,或以jboss-threads.xml结尾。此类描述符的格式如下所示:Java 将jboss的最大http线程数更改为6.1.0.Final,java,http,jboss6.x,httpconnection,Java,Http,Jboss6.x,Httpconnection,我想知道在Jboss 6.1.0.Final中哪里可以增加最大线程数。 我在谷歌上冲浪,但找不到确切的答案,上面提到的文件和位置也不正确。这是用的。您可以在中阅读详细信息 可以编写一个独立描述符,其名称为jboss-threads.xml,或以jboss-threads.xml结尾。此类描述符的格式如下所示: <?xml version="1.0" encoding="UTF-8"?> <threads xmlns="urn:jboss:threads:2.0">
<?xml version="1.0" encoding="UTF-8"?>
<threads xmlns="urn:jboss:threads:2.0">
<thread-factory name="MyThreadFactory" thread-name-pattern="My Thread %t">
<thread-group name="MyThreadGroup"/>
</thread-factory>
<!-- This is the Executor instance -->
<thread-factory-executor name="MyExecutor">
<thread-factory name="MyThreadFactory"/>
<max-threads count="100" per-cpu="100"/>
</thread-factory-executor>
</threads>
<?xml version="1.0" encoding="UTF-8"?>
<deployment xmlns="urn:jboss:bean-deployer:2.0">
<!-- JBossMC elements here -->
<threads xmlns="urn:jboss:threads:2.0">
<thread-factory name="MyThreadFactory" thread-name-pattern="My Thread %t">
<thread-group name="MyThreadGroup"/>
</thread-factory>
<!-- This is the Executor instance -->
<thread-factory-executor name="MyExecutor">
<thread-factory name="MyThreadFactory"/>
<max-threads count="100" per-cpu="100"/>
</thread-factory-executor>
</threads>
</deployment>
或者:您可以将其包含在微容器部署中
由于Microcontainer处理XML部署的方式,可以在常规POJO部署中包括线程描述符,如下所示:
<?xml version="1.0" encoding="UTF-8"?>
<threads xmlns="urn:jboss:threads:2.0">
<thread-factory name="MyThreadFactory" thread-name-pattern="My Thread %t">
<thread-group name="MyThreadGroup"/>
</thread-factory>
<!-- This is the Executor instance -->
<thread-factory-executor name="MyExecutor">
<thread-factory name="MyThreadFactory"/>
<max-threads count="100" per-cpu="100"/>
</thread-factory-executor>
</threads>
<?xml version="1.0" encoding="UTF-8"?>
<deployment xmlns="urn:jboss:bean-deployer:2.0">
<!-- JBossMC elements here -->
<threads xmlns="urn:jboss:threads:2.0">
<thread-factory name="MyThreadFactory" thread-name-pattern="My Thread %t">
<thread-group name="MyThreadGroup"/>
</thread-factory>
<!-- This is the Executor instance -->
<thread-factory-executor name="MyExecutor">
<thread-factory name="MyThreadFactory"/>
<max-threads count="100" per-cpu="100"/>
</thread-factory-executor>
</threads>
</deployment>
这意味着没有像以前的其他版本那样可以直接修改的地方?我不知道你在问什么。你要的是像AS 5中那样的JBoss配置文件吗?我对Standalone和MicroContainer这个词不太理解。我是Jboss的新手。你能详细说明一下吗?谢谢。简单的回答是,单机版只适合你的应用。所以这可能就是你想要的。您是否考虑过升级到JBoss AS 7?如果这不能解决您的问题/顾虑,请您在初始问题中详细说明您的描述?这也将对其他读者有所帮助和益处。是的,我只需要部署EAR。因此,我想将服务器配置为处理最大流量。我不能去AS7,因为使用AS6是公司的决定。