Tuesday, July 23, 2013

Profiling WebSphere Commerce 7.x using VisualVM

Enable JMX client access to local JVM


1. Navigate to Servers -> Server Types -> WebSphere application servers -> server1 -> Process definition -> Java Virtual Machine and append the following line to Generic JVM Argument

-Djavax.management.builder.initial= -Dcom.sun.management.jmxremote
2. Uncomment the following three lines in file /SDP/runtimes/base_v7/java/jre/lib/management/management.properties

com.sun.management.jmxremote.port=3333
com.sun.management.jmxremote.authenticate=false
com.sun.management.jmxremote.ssl=false
com.sun.management.jmxremote.local.only=false

3. Restart WebSphere Application Server

Connect Visual VM to WAS


4. Run visualvm.exe from bin directory and add JMX connection to WebSphere Application Server. Enter localhost:3333 in the connection text box, assuming the server is running on the same machine at port 3333. 3333 is the JMX port configured in management.properties (See step 2)