Versions Compared

Key

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

The servicemix JBIContainer exposes internal services and Components through JMX. The JBIContainer can be passed a JMXBeanServer or 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 this:

Code Block
titleCreating remote JMX Connector to the JBIContainer

String jndiPath = <container name> + "JMX";
JMXServiceURL url = new JMXServiceURL ("service:jmx:rmi:///jndi/rmi://<namingHost>:<namingPort>/" + jndiPath) ;
JMXConnector connector = JMXConnectorFactory.connect(url);


The default namingPort is 1099
The default container name is defaultJBI

Tip
titleDefault JMX Service URL

service:jmx:rmi:///jndi/rmi://localhost:1099/defaultJBIJMX

Using JConsole and Java 5

To enable JMX remoting with Java 5 on some platforms you need to do this first (e.g. on windows?). There's no need on OS X for sure:

Code Block

export JAVA_OPTS="-Dcom.sun.management.jmxremote.port=5001 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false"

Then run JConsole

Code Block

jconsole

Go to the advanced tab and enter the JMX Service URL

Image Added

then you should see all of the ServiceMix MBeans in the console.

Image Added

Using MC4J

When you want to get at the ServiceMix MBeans using MC4J use JSR160 as your server connection type and the above default JMX Service URL as your server URL.

Panel
borderColor#ccc
titleMC4J - JMX Console
borderStylesolid

Image Added

Panel
borderColor#ccc
titleMC4J - JMX Console view 2
borderStylesolid

Image Added

ServiceMix JMX Console

ServiceMix comes with a WAR which can be deployed, including ServiceMix inside any Servlet / J2EE application server in a standard deployment unit. The added benefit of the ServiceMix WAR is it includes a simple JMX operational console as well allowing your web browser to view JMX attributes and statistics.

To create the ServiceMix WAR from a fresh checkout of the code try this

Code Block

cd servicemix/tooling/servicemix-web
maven war

Then drop the WAR in any servlet engine.