質問

JBossの下で実行される2つのアプリケーションがあります。サーバーのオーバーヘッドを削減する方法を探しています。メインアプリはTomcatで実行されます。もう1つのアプリはMBeanで構成されています。 Tomcatの下でMBeanを実行する方法はありますか?

別の提案を歓迎します。

役に立ちましたか?

解決

MBeanは、JREに含まれるJMX仕様の一部です。 Tomcatの下でMBeanを実行できる必要があります。 Tomcat 5以降は、MBeanサーバーを提供します。

他のヒント

次のJVM引数を使用して、MBeanを有効にしてTomcatを起動できます

-Dcom.sun.management.jmxremote
-Dcom.sun.management.jmxremote.port=4444 (could be anything)
-Dcom.sun.management.jmxremote.ssl=false
-Dcom.sun.management.jmxremote.authenticate=false

TomcatにあるMBeanサーバーも使用する必要があります。次の方法で見つける必要があります:

    // find the existing MBean server (tomcat's) in lieu of
    // creating our own
    //
    ArrayList<MBeanServer> mbservers = MBeanServerFactory
            .findMBeanServer(null);

    int nservers = mbservers.size();
    if (nservers > 0) {
        //
        // TODO: A better way to get the currently active server ?
        // For some reason, every time the webapp is reloaded there is one
        // more instance of the MBeanServer
        mbserver = (MBeanServer) mbservers.get(nservers - 1);
    }

    if (mbserver == null) {
        mbserver = MBeanServerFactory.createMBeanServer();
    }

http://community.jboss.org/wiki/JBossASTuningSliming を試してください。使用せずに多くのサービスがあることを確認してください。

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top