2013年6月13日木曜日

JBoss As 7の最大同時接続ユーザ数(スレッド数)の設定方法

ここではJBoss As 7の最大同時接続ユーザ数を設定する方法をメモとして記載したいと思います。

前提条件

  • JBoss 7.1.1 Final
  • JBoss As 7がインストール済み
  • Windows XP 32ビット

JBoss設定ファイルstandalone.xmlの修正

${JBOSS_HOME}\standalone\configuration\に保存されている、JBossの設定ファイル「standalone.xml」を編集します。

<connector name="http" protocol="HTTP/1.1" scheme="http" socket-binding="http" の後にmax-connections要素を追加します。

<subsystem xmlns="urn:jboss:domain:web:1.1" default-virtual-server="default-host" native="false">
    <configuration>
        <jsp-configuration development="true"/>
    </configuration>
    <connector name="http" protocol="HTTP/1.1" scheme="http" socket-binding="http" max-connections="1"/>
    <connector name="ajp" protocol="AJP/1.3" scheme="ajp" socket-binding="ajp"/>
    <virtual-server name="default-host" enable-welcome-root="true">
        <alias name="localhost"/>
        <alias name="example.com"/>
    </virtual-server>
</subsystem>

実行結果の検証

jmeterを使い実際に設定したコネクションが反映されているか調査します。

jmeterの設定は、
  • スレッド数:20
  • Ramp_Up 期間(秒):0
  • ループ回数:1
結果は以下のようになりました。
接続テストの結果画面

最大接続数を1としたので、1回だけ正常終了となっています。

参考文献

  • http://docs.jboss.org/jbossweb/7.0.x/config/http.html
  • http://stackoverflow.com/questions/7066946/jboss-7-how-to-set-thread-pool-size-for-http-connector
  • http://duke4j.wordpress.com/2012/06/25/connecting-jmx-on-jboss-as7-1/

Written By : // 15:34
Category:

0 コメント:

コメントを投稿

 

About

このブログは筆者の備忘録として色々記載しています。

Blog Archive

Powered by Blogger.