Monitoring a JMX enabled Tomcat Server

Steps to make Tomcat server JMX enabled

Once this is done, start the tomcat using startup.bat in the tomcat bin folder. The server should start with out any errors.

Using MAX to monitor Tomcat using JMX

To monitor JMX enabled tomcat using MAX, follow the steps given below.

  1. Start Eclipse
  2. Click on the Menu "Run->profile", profile window opens up
  3. Select and Right click on the "Managed Resource" configuaration which is there in the left hand side of the Tree view.
  4. Click on the "New" menu, to create a new Managed Resource configuration.
  5. Select the check box of "JMX Resource" in the "Monitor" tab
  6. Click the "Edit Options" button, so "JMX Managed Agent Configuration" windows shows up.
  7. Set Connection Type to JSR-160
  8. Set Initial context factory to com.sun.jndi.rmi.registry.RegistryContextFactory
  9. Set Service URL to service:jmx:rmi:///jndi/rmi://localhost:9004/jmxrmi
  10. So Managed Agents are created in "Profiling Monitering" view in the left hand side of the eclipse
  11. Expand Managed Agents and Right click on the "JMX Agent" and click the menu "Open with->Managed Agent Explorer"

Once the resource is opened in the MAX, the user can see its properties and invoke its operations through MAX