Geomajas profiling plug-in guide

Geomajas Developers and Geosparc


Table of Contents

1. Introduction
2. Configuration
1. Dependencies
3. How-to
1. How to use JConsole to connect to the MBeans

List of Examples

2.1. Plug-in dependency

Chapter 1. Introduction

This is a plug-in which automatically adds some profiling code in the code. This profiling information is made available as a JMX bean so you can access it using a tool like JConsole or VisualVM.

The profiling information is gathered in several beans, each profiling a specific piece with combined figures. You can also get figures for groups. The plugin gathers the number of invocations and total runtime. You can clear the information to reset the values and assure they are for a specific period.

Chapter 2. Configuration

Table of Contents

1. Dependencies

1. Dependencies

Make sure sure you include the correct version of the plug-in in your project. Use the following excerpt (with the correct version) in the dependencyManagement section of your project:


If you are using geomajas-project-server in dependency management, this includes the latest released version of the profiling plug-in (at the time of publishing of that version). If you want to overwrite the profiling plug-in version, make sure to include this excerpt before the geomajas-project-server dependency.

You can now include the actual dependency without explicit version.

Example 2.1. Plug-in dependency


Once the dependency is correctly included, everything is set up automatically.

Chapter 3. How-to

1. How to use JConsole to connect to the MBeans

If you want to use JConsole to look at the profiling information and you are not using a security manager (or it does not allow downloading of classes through RMI) then you need to add the profiling jar in the classpath to be able to access the information.

This can be done by invoking JConsole using a command like this (adjust paths as appropriate)

jconsole -J-Djava.class.path=$JAVA_HOME/lib/jconsole.jar:\