编程语言
首页 > 编程语言> > java-使用Sun JConsole访问Websphere 7 MBean

java-使用Sun JConsole访问Websphere 7 MBean

作者:互联网

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

解决方法:

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>%替换为$< 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在此关于Websphere 6.1的posting上的回答,对此提供了帮助.

标签:jconsole,mbeans,websphere,jmx,java
来源: https://codeday.me/bug/20191102/1991613.html