Jolokia Maven modules
This page describes available Maven artifacts and shows changes introduced in Jolokia 2.0
Jolokia 1.x modules
In Jolokia 1.x, there are two groups of Maven modules:
By Jolokia agent we mean an entity that exposes internal structure o the application (JMX) to outside world (HTTP clients). Assuming this analogy, the agent modules include (groupId is org.jolokia
, artifactId is shown in the table):
Artifact ID | Description |
---|---|
|
Core agent functionality which is sufficient to run Jolokia agent with JMX access and JSON serialization |
|
Helper module that makes it easier to register MBean using Jolokia own JMX MBean Server |
|
Agent module that adds JSR 160 request dispatcher which allows Jolokia to operate on MBeans registered in remote MBean Servers using JSR-160 JMX Remote protocol. |
|
A standalone Jolokia agent that can be configured using |
|
Spring agent that extends |
|
OSGi agent that uses OSGi CMPN Http Service API to register Jolokia Agent Servlet within OSGi runtime |
|
OSGi agent which is packaged with Felix HTTP service |
|
WAR agent which is packaged as standard Web Application compliant with Servlet API 4 |
|
WAR agent without security enabled |
Client modules are used to connect to available Jolokia Agent over HTTP protocol:
Artifact ID | Description |
---|---|
|
Dedicated client based on Apache HTTP Client 4 |
|
Maven module containing Javascript libraries |
|
Special reversed client library. It contains implementation of |
|
An implementation of |
Jolokia 2.0 modules
Jolokia 2 is fully restructured to embrace modularization and pluggability. This makes the core library slimmer. However more libraries than just core are required to provide basic functionality.
Maven artifacts are also renamed. We follow a convention where artifact ID (which physically is all we get in the resulting file/jar name) fully identifies the contained functionality. That’s why for example we’ve renamed:
-
jolokia-core
tojolokia-server-core
-
jolokia-jvm
tojolokia-agent-jvm
-
jolokia-jsr160
tojolokia-service-jsr160
We have now 6 groups of modules:
Single module which implements JSON parser/serializer, which replaces long-time used json-simple library.
Artifact ID | Description |
---|---|
|
More flexible (from Jolokia perspective) and faster implementation of json-simple. |
One module provides core Jolokia functionality:
Artifact ID | Description |
---|---|
|
It’s roughly the same as Jolokia 1 |
Core Jolokia library is extended with pluggable services which are implemented in service modules and discovered using a method similar to java.util.ServiceLoader
with additional features.
These services are declared in /META-INF/jolokia/<kind>[-default]
files:
kind | interface | description |
---|---|---|
|
|
Generic Jolokia service which is looked-up using more specific interface and use in Jolokia core. |
|
|
A service used to find appserver specific |
|
|
A service used by |
Core Jolokia library discovers services in libraries available on CLASSPATH
.
Artifact ID | Description |
---|---|
|
S set of built-in services which can be used to detect extra, non-discoverable (see |
|
Registers |
|
Registers |
|
Mandatory service that adds |
|
A service that adds |
|
A notification service using pulling method |
|
A notification service using Server-Sent Events |
|
Mandatory service that is used to convert Java objects into JSON representation. |
Sometimes we want to select which detected services are actually enabled. We can configure which services to use with the help if these configuration options:
-
enabledServices
- a comma-separated list of fully-qualified class names. If this configuration option is specified and is not empty, only the services from this list will be actually used. -
disabledServices
- a comma-separated list of fully-qualified class names. If this configuration option is specified and is not empty, all detected services (from/META-INF/jolokia/services(-default)
) will be filtered to not include the disabled services.
This additional configuration (since 2.1.0) allows to use existing jolokia-agent-jvm-2.1.2-javaagent.jar
with all services declared in /META-INF/jolokia/services-default
and select what is actually needed in specific scenario.
- NOTE
-
disabledServices
option takes precedence (because the default behavior is to use all detected services). And we rather want to narrow down detected services, than pick up the ones we want.
Since Jolokia 2.1.0, server detectors (which help locating javax.management.MBeanServer
instances in several application servers) can be disabled using disableDetectors
option, because we may simply run Jolokia agent for standalone Java application.
Agent modules are used in various runtime environments to configure and start Jolokia Agent.
Artifact ID | Description |
---|---|
|
A standalone Jolokia agent that can be configured using |
|
OSGi agent that uses OSGi CMPN Whiteboard Specification for Jakarta™ Servlet to register Jolokia Agent Servlet within OSGi runtime |
|
WAR agent which is packaged as standard Web Application compliant with Servlet API 5+ (JakartaEE 9+) |
|
WAR agent without security enabled |
Client modules are used to connect to running Jolokia Agents.
Artifact ID | Description |
---|---|
|
dedicated client based on Apache HTTP Client 4 |
|
Maven module containing Javascript libraries |
|
Special reversed client library. It contains implementation of |
|
An implementation of |
Supporting libraries for miscellaneous purposes.
Artifact ID | Description |
---|---|
|
Helper library that adds Jolokia-specific |
|
Spring support library (Spring Boot, Spring Framework) |