Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Using a JMX Console With ServiceMix

This document explains how to connect a JMX Console to ServiceMix. Two open-source JMX Consoles will be discussed:

...

Tip
titleDefault Settings

The default namingPort is 1099
The default container name is defaultJBI
The JMX Service URL is: service:jmx:rmi:///jndi/rmi://localhost:1099/defaultJBIJMX

Using JConsole

The Java-2 Platform, Standard Edition (J2SE) 5.0 release includes a JMX monitoring tool, JConsole. JConsole monitors applications running on the Java platform and provides information on their performance and resource consumption. Please see Sun's documentation for more information on using this tool. Note: this tool is available with the Java 5 release.

...

  1. To see JConsole in action, start one of the ServiceMix examples running, for instance, the Basic Example:
    Code Block
    cd [servicemix_install_dir]\examples\basic
    ..\..\bin\servicemix servicemix.xml
    
    where servicemix_install_dir is the directory in which ServiceMix was installed.
  2. Run JConsole (see previous section) and click on org.servicemix.
  3. Click on org.servicemix.jbi.framework.ComponentMBeanImpl. The components of the Basic example will be shown. Clicking on any of them will show the monitoring information available.

    Panel
    borderColor#ccc
    titleJConsole Monitoring & Management Console
    borderStylesolid

Using MC4J

MC4J is a JMX Console. It can connect to J2EE servers, MBeans, and applications and monitor them.

...

  1. ServiceMix should be running first. Please see the #Getting Started Guide for instructions on running ServiceMix.
  2. Click on the MC4J executable MC4J Console 1.2b9.exe (for Windows) to start itMC4J. It The executable can be found in the top-level directory of the MC4J installation. The MC4J window will appear.
  3. Select "Management>Create Server Connection..." from the menu. This will bring up the wizard start "My Wizard". That is where the connection to ServiceMix can be added.
    Panel
    borderColor#ccc
    titleJConsole Agent
    borderStylesolid



  4. Enter the following into the text boxes/pull-down menus:
    Select your server connection type: JSR160
    Name: This can any name, for example, ServiceMix
    Server URL: service:jmx:rmi:///jndi/rmi://localhost:1099/defaultJBIJMX
    The Server URL is service:jmx:rmi:///jndi/rmi://hostname:port/app_to_monitor. Where the hostname is name of the host on which the application to be monitored is running, the port is the port number to connect to the application, and the app_to_monitor is the JMX enabled application to monitor. For example, if none of the defaults for ServiceMix have been modified and ServiceMix is running on localhost, enter the following: service:jmx:rmi:///jndi/rmi://localhost:1099/defaultJBIJMX.
  5. Take the defaults for the rest of the fields in the Wizard.
  6. Click "Next."
  7. Click "Finish."

    Panel
    borderColor#ccc
    titleMC4J Connections
    borderStylesolid


Testing MC4J with ServiceMix

Panel
borderColor#ccc
titleMC4J - JMX Console
borderStylesolid

Image RemovedImage Added

Panel
borderColor#ccc
titleMC4J - JMX Console view 2
borderStylesolid

...