使用Sun JConsole访问Websphere 7 MBean

时间:2011-06-30 03:51:24

标签: java websphere jmx jconsole mbeans

如何使用Sun的JConsole访问Websphere 7 MBean?

1 个答案:

答案 0 :(得分:4)

bootclasspath中的必需库(来自Websphere 7):

ibmorbapi.jar
ibmorb.jar
ibmcfw.jar

类路径中的必需库:

com.ibm.ws.admin.client_7.0.0.jar (from Websphere 7)
tools.jar (Sun)
jconsole.jar (Sun)

以下是将所有内容联系在一起的脚本。根据您的环境更新前4行(在Linux / Unix上 - 替换环境变量%<name>% to $<name>

set JAVA_HOME=C:\tools\jdk1.6.0_19
set WS7_HOME=C:/tools/WebSphere/AppServer
set WS_HOST=127.0.0.1
set WS_PORT=2809

set BOOTPATH=%WS7_HOME%/java/jre/lib/ibmorbapi.jar;%WS7_HOME%/java/jre/lib/ibmorb.jar;%WS7_HOME%/java/jre/lib/ibmcfw.jar
set CLASSPATH=%WS7_HOME%/runtimes/com.ibm.ws.admin.client_7.0.0.jar;%JAVA_HOME%\lib\tools.jar;%JAVA_HOME%\lib\jconsole.jar

%JAVA_HOME%\bin\jconsole -J-Xbootclasspath/p:%BOOTPATH% -J-Djava.class.path=%CLASSPATH% service:jmx:iiop://%WS_HOST%:%WS_PORT%/jndi/JMXConnector

应该这样做!我要感谢Alan Chan对此posting关于Websphere 6.1的回应。