Using a JMX Console
...
with ServiceMix
This document explains how to connect a JMX Console to ServiceMix. The following three open source JMX Consoles will be discussed:
...
The ServiceMix JBIContainer exposes internal services and Components through JMX. The JBIContainer can be passed as a JMXBeanServer or, it can be configured to create one , if one doesn't exist (see Configuration). If the JBIContainer creates its own MBeanServer instance, it also creates an RMI JMXConnector - to allow remote connections. The Ant Tasks use thisthe following:
Code Block | ||
---|---|---|
| ||
String jndiPath = <container name> + "JMX"; JMXServiceURL url = new JMXServiceURL ("service:jmx:rmi:///jndi/rmi://<namingHost>:<namingPort>/" + jndiPath) ; JMXConnector connector = JMXConnectorFactory.connect(url); |
The following configuration variables will be needed in are required for the next sections.
NOTE: The values shown are the default settings for ServiceMix.
Anchor | ||||
---|---|---|---|---|
|
...
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. Please see the following sections for instructions on configuring and using JConsole with ServiceMix.
NOTE: this This tool is available with the Java 5 release only.
...
This section explains how to configure JConsole to monitor ServiceMix. The ServiceMix port number, the ServiceMix container id, and the JMX Service URL will be required. This information was specified in the previous section, in the Default Settings box.
...
ServiceMix includes a simple JMX operational console. A ServiceMix WAR file can be created and deployed inside any Servlet / J2EE application server in a standard deployment unit. The benefit of the ServiceMix WAR file is that it includes a JMX Console that allows a web browser to be used to view JMX attributes and statistics.
Starting the ServiceMix JMX Console
To create the ServiceMix WAR file from a source doownload download of ServiceMix do the following:
- Download and build the ServiceMix source code. Please see the Getting Started guide for instructions.
- Create the WAR file:
whereCode Block cd servicemix/tooling/[servicemix_install_dir]\tooling\servicemix-web maven war
servicemix_install_dir
is the directory to which ServiceMix was downloaded. - Deploy the WAR file into any servlet engine. Instructions for deploying the ServiceMix WAR file on Tomcat, JBoss, and Geronimo are provided in section_to_be_written.
- Start ServiceMix from the servlet engine. Please see the section to be written for details on doing this.
- can be found at the following links:
- Run Start the ServiceMix JMX Console. Enter To do this enter the following URL into in a web browser: URL-to-be-provided: http://localhost:8080/servicemix-web
Using the ServiceMix JMX Console
For examples of how to use the ServiceMix JMX Console, please see War Deployment.