Aspire :: End-to-End Management :: VisualVM Plugins



Graphical user interfaces (GUI) for managing different Aspire components are available in the form of VisualVM plugins. The VisualVM is an extensible visual tool designed for both production and development time use, it further enhances the capability of monitoring and performance analysis of Java applications. The OW2 AspireRFID project takes advantage of such infrastructure in order to provide plugins targeting the management of different Aspire components (ALE, BEG, EPCIS, APE, ...). The management funcionality is exposed by those components using JMX interfaces in the form of MBeans (Manageable Beans). The VisualVM Aspire plugins connect to such management interfaces for providing live monitoring and management of such components through a GUI.

Building

Currently the plugins are available in Aspire's SVN trunk, under the management/visualvm folder.

After downloading the projects from the trunk, there are two option for running the plugins:

  • (1) Opening the Netbeans projects and executing the Module Suite,
  • or (2) Building the projects and installing the generated plugins in the VisualVM.
The first option is suggested for development purposes, like understanding how the plugins were implemented or performing custom adjustments in the code. The second option is the preferred way to use the plugins, and is described in the next paragraphs.

In order to build the plugins, it is necessary to have the latest version of Apache Ant installed and the latest JDK, for compiling the projects. After having all the pre-requisites set and properly configured (e.g., JAVA_HOME and ANT_HOME environment variables), you can build the project. Go to a command line tool (e.g., Windows command prompt, Linux shell) and from inside the VisualVMAspireModuleSuite folder, type:

ant nbms

That command will build the files and generate the nbm artifacts in the build/updates folder. An nbm corresponds to a Netbeans Module. Since the VisualVM is a tool buit on top of the Netbeans platform, the VisualVM plugins take the form of Netbeans plugins.

Installing the VisualVM

The VisualVM can be installed in two ways:

#As part of a JDK installation. The VisualVM will be available via the jvisualvm command, installed in your JAVA_HOME/bin directory #As a separate download, from the VisualVM downloads page. After uncompressing the installation file, a visualvm executable can be found in the VISUALVM_INSTALLATION/bin folder

Installing the Aspire plugins in the VisualVM

The generated plugins need to be manually installed in the VisualVM. The following steps must be taken
  • Start the VisualVM
  • Go to the menu Tools > Plugins
  • Go to the downloaded tab
  • Click the Add Plugins button
  • Browse the nbm files generated in building step, and select them all
  • Confirm all operations, and close the plugins window

Visualizing the plugins

The VisualVM works inspecting Java processes, so it is necessary to connect to a Java process that runs an Aspire component (EPCIS, ALE Server, BEG). In addition, the corresponding component must have the respective MBeans enabled, so the Aspire plugins can be enabled. If these preconditions are fulfilled, you can execute the VisualVM and visualize on the Applications tree, on the left, all Java processes that are running (optionally you can connect to a remote machine). By choosing the appropriate process (e.g. An OSGi application running the ALEServer), the VisualVM will connect to the Java processe, and start the Aspire Plugins that are installed. If the corresponding Aspire MBeans are present, the plugins will be shown

FAQ

How MBeans are configured in the WEB-INF/web.xml of servers' WAR file

How to lauch the VisualVM

The VisualVM is now provisioned with the JDK

So run just %JAVA_HOME%binjvisualvm.exe

How to lauch the VisualVM from Eclipse

TBD

How to install the plugin

  1. Menu "Tools>Plugins"
  2. Tab "Downloaded"
  3. Button "Add plugins..." and browse your file system
  4. Select them and button "Install"

How to install additionnal plugins from the central repository

  1. Menu "Tools>Plugins"
  2. Tab "Availables plugins"
  3. Select them and button "Install"

How to connect to the process (local or remote)

Local
Double-click the java process corresponding to the ALEServer in the "Application" panel (on the left).
Remote
The Java process must be launch with the following options in order to start the JMX RMI Connector. More information

With Tomcat, the options are -Dcom.sun.management.jmxremote.port=8086 -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false More information

Add the connection from the menu "File>Add remote host..." or "File>Add JMX Connection..."

How to extend the VisualVM plugin

JMX Utilities

Other consoles for JMX

How to manage OSGi platforms with JMX

A recent specification addresses how to manage OSGi platforms with JMX :

How to start with JMX

Several tutorials on JMX