TID-JMA4O

PROJECT

RELATED

TID-JMA4O



Introduction


TID-JMA4O (JMX based Management Agent for OSGi)  bundle provides a JMX server and exposes the OSGi framework and several standard services with MBeans. The bundle allow to register other MBeans through and OSGi service too.

The bundle start a RMI JMXConnector with the configurable parameters port and jndiPath, through the properties file AgentProperties.txt inside the bundle.

This bundles has been tested and runs in two OSGi frameworks: OSCAR and Knopflerfish


Quick Start



Environment:
 
Needed bundles:

When all the needed bundles are installed and started, you can start the tid-jma4o.jar bundle, which start the MBeanServer, the JMXConnector (with the configured port and jndiPath), and register the JMXAccess service in the framework.
The available MBeans depends on the standard services that are running in the framework. When a supported standard service is started, the agent automatically create an MBean an register it in the MBeanServer. The supported services are:

Then you can access to the MBeanServer using the JMX Remote API (JSR160). As an example of access we are going to see the MC4J, a generic JMX Management Console.

When the tool is installed and running, we can create new connections. We must choose the JSR160 type, and write some parameters. Only the parameters in the image are relevant to connect with TID-JMA4O. The most important parameter, Server URL, must have a similar value as in the image, with the next format:

    service:jmx:rmi://<host>/jndi/rmi://<host>:<port><jndipath>

where <host> is the host name or ip ; <port> is the port that we are configured in the properties of the agent (1099 by default); and for <jndipath> is the value configured in the agent too (jmxconnector by default).

New connection


The next image show the MBeans available for this connection. We can see many MBean related to an OSGi framework.

FrameworkProperties
 


Available MBeans



The MBeans are registered in a MBeanServer with and ObjectName, which include a string with the format “DOMAIN:  property1=value1[,propertyN=valueN]” that identifies an MBean in the MBean Server.

 

There are four domains in our agent:



Registering your MBeans



If you want to instrument your bundles/services through JMX, you can get the JMXAccess service and use his interface for register new MBeans in the MBeanServer. The service is registered under the interface “org.osmose.tid.osgi.mgmt.jmxserver.service.JMXAccess”, which have two methods, one to register and other to unregister MBeans.

License


TID-JMA4O is distributed under the GNU Lesser General Public License, LGPL, for detailed information visit LGPL


Telefónica I+D


TID-JMA4O has been developed by Telefónica I+D in the context of the ITEA-OSMOSE project.