Accessing Websphere 7 MBeans using Sun JConsole

How do I access Websphere 7 MBeans using Sun’s JConsole?


Required libraries in bootclasspath (from Websphere 7):


Required libraries in classpath: (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:toolsjdk1.6.0_19
set WS7_HOME=C:/tools/WebSphere/AppServer
set WS_HOST=
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/;%JAVA_HOME%libtools.jar;%JAVA_HOME%libjconsole.jar

%JAVA_HOME%binjconsole -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.

Leave a Reply

Your email address will not be published. Required fields are marked *