Consortium
Activities
Projects
Forge
Events
Log-in
Register
Aspire :: End-to-End Management :: VisualVM Plugins
Space Menu
Consortium
|
Solutions
|
Middleware
|
Forge
|
MyObjectWeb
|
PDF
|
History
|
More Actions
View
Code
|
XML
|
Help
Documentation
|
XWiki Syntax
|
1 Aspire :: End-to-End Management :: VisualVM Plugins ---- #toc("" "" "") ---- Graphical user interfaces (GUI) for managing different Aspire components are available in the form of [VisualVM>https://visualvm.dev.java.net/] 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. 1.1.1 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>http://ant.apache.org] 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: {code}ant nbms{code} 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. 1.1.1 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>https://visualvm.dev.java.net/download.html]. After uncompressing the installation file, a visualvm executable can be found in the VISUALVM_INSTALLATION/bin folder 1.1.1 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 1.1.1 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 1.1 FAQ 1.1.1 How MBeans are configured in the WEB-INF/web.xml of servers' WAR file 1.1.1 How to lauch the VisualVM The VisualVM is now provisioned with the JDK So run just %JAVA_HOME%\bin\jvisualvm.exe 1.1.1 How to lauch the VisualVM from Eclipse TBD 1.1.1 How to install the plugin # Menu "Tools>Plugins" # Tab "Downloaded" # Button "Add plugins..." and browse your file system # Select them and button "Install" 1.1.1 How to install additionnal plugins from the central repository # Menu "Tools>Plugins" # Tab "Availables plugins" # Select them and button "Install" 1.1.1 How to connect to the process (local or remote) 1.1.1.1 Local Double-click the java process corresponding to the ALEServer in the "Application" panel (on the left). 1.1.1.1 Remote The Java process must be launch with the following options in order to start the JMX RMI Connector. [More information>http://java.sun.com/javase/6/docs/technotes/guides/management/agent.html] 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>http://tomcat.apache.org/tomcat-6.0-doc/monitoring.html] Add the connection from the menu "File>Add remote host..." or "File>Add JMX Connection..." 1.1.1 How to extend the VisualVM plugin * https://visualvm.dev.java.net/api-quickstart.html * http://blogs.sun.com/geertjan/entry/getting_started_extending_visualvm 1.1.1 JMX Utilities * [MBeanCmd>http://jasmine.ow2.org/doc/docbkx/mbeancmd-user-guide/2.2.1-SNAPSHOT/html/mbeancmd_guide.html] * [Tomcat JMX Ant tasks>http://tomcat.apache.org/tomcat-6.0-doc/monitoring.html#Manage_Tomcat_with_JMX_remote_Ant_Tasks] 1.1.1 Other consoles for JMX * JConsole * [MC4J>http://mc4j.org/confluence/display/mc4j/Home] * [Eclipse JMX>http://code.google.com/p/eclipse-jmx] * [OW2 Jasmine Flex Console>http://jasmine.ow2.org] 1.1.1 How to manage OSGi platforms with JMX A recent specification addresses how to manage OSGi platforms with JMX : * http://www.osgi.org/javadoc/r4v42/org/osgi/jmx/package-summary.html * http://www.osgi.org/javadoc/r4v42/org/osgi/jmx/framework/package-summary.html * http://www.osgi.org/javadoc/r4v42/org/osgi/jmx/service/cm/package-summary.html * http://www.osgi.org/javadoc/r4v42/org/osgi/jmx/service/permissionadmin/package-summary.html * http://www.osgi.org/javadoc/r4v42/org/osgi/jmx/service/provisioning/package-summary.html * http://www.osgi.org/javadoc/r4v42/org/osgi/jmx/service/useradmin/package-summary.html 1.1.1 How to start with JMX 1.1.1.1 Several tutorials on JMX * http://download.oracle.com/docs/cd/E17409_01/javase/6/docs/technotes/guides/jmx/tutorial/tutorialTOC.html * http://download.oracle.com/docs/cd/E17409_01/javase/tutorial/jmx/index.html