BackPrevious Page Next PageNext

Managing and Monitoring Resources Using the JMX Monitoring Features

JReport Server's JMX monitoring features

Using the JMX Monitoring features

JMX Monitoring in an integration environment

Notes for using the JMX Monitoring function

JMX is a Java standard in the aspect of management. It provides a local or remote model for managing Java application systems. Its target is to offer the instrumentation, which can be accessed by all kinds of application management systems.

A JMX-compliant Application Server makes all registered manageable resources possible to be managed, configured, and controlled easily and flexibly. All those managed resources can be dynamically modified and processed by third-party management software or other management component systems.

JReport Server's JMX Monitoring features

This section introduces the infrastructure with which the JMX Monitoring features are implemented and the implementing methods that can be used.

MBeans building principle

JReport adopts a Standard MBean specification for building JReport Server's underlying managed beans.

In the process of creating and registering the JMX MBean, JReport designed and abstracted all meta-data of all managed resources and then saved them into their corresponding persistent entities. At runtime, the program changes all these meta-data into MBeanInfo and then adds them to the related Managed Bean.

After all these MBeans have been built, they are then registered into an internal or external MBeanServer Agent. Only when top-level management software or other integration environments can find the MBeanServer agent, can they manage and control all the underlying Managed Beans registered in the MBeanServer.

Working principle behind the JMX Monitoring function

With JReport Server Monitor, when all the managed resources objects of Report Server have been initiated and instantiated, the Managed MBeans are then registered into the MbeanServer. Then all the attributes, operations, notifications and constructors of the associated Managed resource object are exposed to the MBeanServer via the corresponding Managed Bean. The MBeanServer then exposes all of these registered Managed Beans to the top-level management system resorted to the related Protocol Adaptors or Connectors.

In Server Monitor's environment, when launching the Server Monitor, JReport firstly created ClusterRuntimeMBean, ServerRuntimeMBean for every active JReport Server in the cluster, and TaskRuntimeMBean, UserSessionRuntimeMBean, DatabaseRuntimeMBean, AdhocRuntimeMBean for every active running JReport Server. Then all these MBeans can be registered into the integrated customized MBeanServer or Standalone MBeanServer agent. At any time, when a JReport Server is launched, the TaskRuntimeMBean, UserSessionMBean, DatabaseRuntimeMBean and AdhocRuntimeMBean associated with it are created and registered into the MBeanServer agent too. Then, all of JReport Server's monitoring features can be exposed to top-level management software or other integration environment resorted to the MBeanServer agent.

So, all the Runtime MBeans of Task, User Session, Database and Ad hoc related are dynamically created in real time and registered into a local MBeanServer. The MBeanServer will then invoke all registered MBean operation or attributes to implement the JMX monitoring function.

Descriptions of MBeans in JReport Server

When starting JReport Server Monitor, the following MBeans are created:

HtmlAdaptor

JReport provides an HtmlAdaptor which allows all registered JReport Server's MBeans to be viewed from web pages. This HtmlAdaptor is based on the default implementation of Sun's JMX tools, and can process a user's HTTP request and dispatch it to the MBeanServer Agent. Then respond to client-end web pages according to the MBeanServer's returned information.

The HtmlAdaptor is also instantiated as an MBean and registered into the MBeanServer Agent. Due to this, you can modify its listener port or other properties from the MBeanServer just like other MBeans.

By default, the HTMLAdaptor uses the port 8849 for providing web services. You can modify it and specify a distinct port in the server.properties file in <install_root>\bin. If you have launched Server Monitor and JMX startup has been set to true, a property item named monitor.jmx.htmladaptor.port will then be appended to the server.properties file in <install_root>\bin.

After launching JReport Server and Server Monitor, and setting the monitor JMX startup property to true, all registered JReport Server's MBeans will then be available for viewing from a web page (http://localhost:8849 by default).

Supporting tips information in the web UI (some auxiliary tools)

In the default implementation mode, all MBean information is built by MBeanServer. All the descriptions and names of attributes, operations, and parameters displayed in the web UI are adopted as the default contents by the MBeanServer Agent.

For friendly supporting tips information in the web UI, JReport has improved all the managed beans with extended methods for supporting customized descriptions and names of the attributes, operations and parameters. All these customized descriptions and names are built into the MBeanInfo of all the registered MBeans. The MBeanServer will invoke these methods to obtain our customized descriptions and names of all displayed MBeanInfo's attributes, operations and parameters in the web UI.

Using the JMX Monitoring features

JReport have created a local MBeanServer for managing all Runtime MBeans in default mode. The management program within a standalone can directly get an MBeanServer's reference via the default implementation of the MBeanServerFinder interface.

In addition, you can also specify your customized MBeanServerFinder's implementation for obtaining an external MBeanServer agent when launching the Server Monitor. You then need only to append the Java option -Djrs.externalMBeanServerProvider= with your fully-qualified customized class file name to the Java command line that launches the Server Monitor.

When the Server Monitor has been started and the JMX feature supporting has been set to true, it will then get the System property of rs.externalMBeanServerProvider. If this property has been set, the Server Monitor will use it to obtain an external MBeanServer Agent. Otherwise, a default standalone MBeanServerFinder implementation will be adopted to get the internal default MBeanServer Agent.

After launching JReport Server and Server Monitor, and setting monitor JMX startup property to true, all registered JReport Server's MBeans will be available for view from a web page (default http://localhost:8849).

JMX Monitoring in an integration environment

In an integration environment with top-level java-enabled management software or another JMX-compliant HTTP application server, that application server has probably already provided an MBeanServer Agent for managing its manageable beans. When integrating JReport Server and Server Monitor with that server, all JReport Server's MBeans should also be registered into its existing MBeanServer.

We provide an MBeanServerFinder interface to support user's customized implementation for obtaining an external MBeanServer Agent.

If you want to integrate JReport Server and Server Monitor with other JMX-enabled application server environment, you should provide an MBeanServerFinder's implementation for obtaining the application server's MBeanServer Agent, and append their implemented fully-qualified class file name with the java option -Djrs.externalMBeanServerProvider= to the corresponding application server's launching java command line. Then, after launching the application server integrated with JReport Server and Server Monitor, if you specify jmx startup to be enabled, then all JReport Server's MBeans will be built and registered into the application server's MBeanServer Agent. At the same time, the default HtmlAdaptor JReport provides will also be built and registered into the external MBeanServer Agent. Then all registered JReport Server's MBeans and the application server's registered managed beans from the HtmlAdaptor or via the application server's provided interface can be viewed.

In the default implementation, JReport has also provided three general integration-related MBeanServerFinder implementations as simple samples: JBossMBeanServerFinderImpl, TomcatMBeanServerFinderImpl and WebLogicMBeanServerFinderImpl. When you integrate JReport Server and Server Monitor with JBoss, Tomcat and WebLogic complied with JMX features, they can provide their implemented external MBeanServerFinder implementation to the java command line option -Djrs.externalMBeanServerProvider=, or directly use our default implementation and append it to the java option.

Notes for using the JMX Monitoring function

When using the JMX Monitoring function, pay attention to the following aspects:

BackPrevious Page Next PageNext