可以在 Application Server 上配置 J2SE 1.4、5.0 和相容版本。啟動 JMX 代理程式是 J2SE 5.0 平台不可或缺的功能。如果您在伺服器啟動時明確設定系統特性,則會啟動此代理程式。
範例值包括下列各項:
name="com.sun.management.jmxremote" value="true" name="com.sun.management.jmxremote.port" value="9999" name="com.sun.management.jmxremote.authenticate" value="false" name="com.sun.management.jmxremote.ssl" value="false"
配置 JMX 特性並啟動伺服器後,新的 jmx-connector 伺服器將在 Application Server VM 中啟動。其中一個不好的副作用是管理功能會受到不良影響,並且 Application Server 管理 GUI 和 CLI 可能產生未預期的結果。這些結果是由內建 jmx-connector 伺服器與新的 jmx-connector 伺服器之間的衝突所造成。
如果使用的是 jconsole 或其他任何與 JMX 相容的用戶端,請考慮重新使用在 Application Server 啟動時一起啟動的標準 JMX Connector Server。
伺服器啟動時,server.log 中會出現類似以下段落所示的行。您可連線至其中指定的 JMXServiceURL,並在成功提供憑證之後執行相同的管理和配置作業,例如:
[#|2004-11-24T17:49:08.203-0800|INFO|sun-appserver-ee8.1|javax.enterprise. system.tools.admin|_ThreadID=10;|ADM1501: Here is the JMXServiceURL for the JMXConnectorServer: [service:jmx:rmi:///jndi/rmi://hostname:8686/management/ rmi-jmx-connector]. This is where the remote administrative clients should connect using the JSR 160 JMX Connectors.|#]
如需更多資訊,請參閱「Sun Java System Application Server 8.2 管理指南」。