Accessing Websphere 7 MBeans using Sun JConsole
How do I access Web开发者_JAVA百科sphere 7 MBeans using Sun's JConsole?
Required libraries in bootclasspath (from Websphere 7):
ibmorbapi.jar
ibmorb.jar
ibmcfw.jar
Required libraries in classpath:
com.ibm.ws.admin.client_7.0.0.jar (from Websphere 7)
tools.jar (Sun)
jconsole.jar (Sun)
Below is the script that ties everything together. Update first 4 lines according to your environment (On Linux/Unix - replace environment variables %<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
And that should do it! I would like to thank Alan Chan for his response on this posting about Websphere 6.1 that helped with this.
精彩评论