|
1 | 1 | //// |
2 | | - Copyright 2009-2024 Jolokia Team |
| 2 | + Copyright 2009-2026 Jolokia Team |
3 | 3 |
|
4 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); |
5 | 5 | you may not use this file except in compliance with the License. |
|
15 | 15 | //// |
16 | 16 | == News |
17 | 17 |
|
| 18 | +=== Jolokia 2.5.0 released |
| 19 | +
|
| 20 | +[.news-date] |
| 21 | +2026-02-10 |
| 22 | +
|
| 23 | +We're happy to announce a new big release of Jolokia 2.5.0! |
| 24 | +
|
| 25 | +==== A word on Semantic Versioning |
| 26 | +
|
| 27 | +First - a little apology for breaking https://semver.org/[Semantic Versioning] principles. Jolokia 2.4 and now 2.5 introduced some API |
| 28 | +changes related to refactoring and introduction of SPI interface for Jolokia Client (with 3 built-in implementations). |
| 29 | +
|
| 30 | +Jolokia is not a single library - it includes: |
| 31 | +
|
| 32 | +* Agent modules - for running Jolokia Agent as a Web Application in a https://jakarta.ee/specifications/servlet/6.1/jakarta-servlet-spec-6.1[Servlet Container], https://docs.spring.io/spring-boot/3.5/reference/actuator/endpoints.html[Spring Boot Actuator endpoint] or standalone Agent using https://docs.oracle.com/en/java/javase/17/docs/api/jdk.httpserver/module-summary.html[JDK HTTP Server]. |
| 33 | +* Java Client libraries - for accessing the Agent using HTTP Client libraries (now - 3 different implementations) |
| 34 | +* JavaScript NPM packages - for accessing the Agent using JavaScript |
| 35 | +* https://docs.oracle.com/en/java/javase/17/docs/api/java.management/javax/management/remote/JMXConnector.html[JMX Connector (Client)] implementation |
| 36 | +* A Jolokia protocol specification (format of JSON messages) with own versioning scheme |
| 37 | +
|
| 38 | +Traditionally Jolokia didn't change the major version too often and we've decided to continue this tradition. + |
| 39 | +Indeed, Jolokia Client API has changed, but the migration should be straightforward (just change `J4p` to `Jolokia` prefix for several client-related classes). The main reason for the change was the introduction of SPI interface (`org.jolokia.client.spi.HttpClientSpi`) and removing direct dependency on https://hc.apache.org/httpcomponents-client-4.5.x/index.html[Apache HttpClient 4] API. |
| 40 | +
|
| 41 | +==== Module reorganization |
| 42 | +
|
| 43 | +Jolokia 2.4.0 introduced new Jolokia Client based on SPI interface and discoverable implementations. This change is combined with a refactoring of _serialization mechanisms_. Before Jolokia 2.4.0, we had three different mechanisms: |
| 44 | +
|
| 45 | +* Server (Agent) code was using the _best_ (de)serialization for all required complex data structures (based on Open Types from JMX) |
| 46 | +* Jolokia Client was used simplified serialization (object to JSON) mechanism for setting MBean attributes and invoking MBean operations |
| 47 | +* JMX Adapter (https://docs.oracle.com/en/java/javase/17/docs/api/java.management/javax/management/remote/JMXConnector.html[JMX Connector (Client)] implementation) was using simplified deserialization mechanism for building Java object from JSON data retrieved using Jolokia Client |
| 48 | +
|
| 49 | +Jolokia 2.5.0 removes this difference and now a single, unified (de)serialization mechanism is used in all these areas. This allows use to use Jolokia JMX Adapter with more complex MBeans like Java Flight Recorder. |
| 50 | +
|
| 51 | +A new `org.jolokia:jolokia-core` module is introduced - it contains common utilities (escaping, serialization, logging) to be reused throughout other Jolokia modules. |
| 52 | +
|
| 53 | +==== Open Types discovery |
| 54 | +
|
| 55 | +https://docs.oracle.com/en/java/javase/17/docs/api/java.management/javax/management/MXBean.html[MXBean Specification] has clear, strict, but very flexible rules for Java object representation using _Open Types_. + |
| 56 | +In Jolokia 2.5.0 we can use the `list` operation to retrieve actual structure of the complex Open Types used by M(X)Bean attributes and operations. |
| 57 | +
|
| 58 | +A picture is worth 1000 words, so here are the attributes for `java.lang:type=Memory` MBean before 2.5.0: |
| 59 | +
|
| 60 | +[,json] |
| 61 | +---- |
| 62 | +{ |
| 63 | + "request": { |
| 64 | + "path": "java.lang/type=Memory/attr", |
| 65 | + "type": "list" |
| 66 | + }, |
| 67 | + "value": { |
| 68 | + ... |
| 69 | + "HeapMemoryUsage": { |
| 70 | + "r": true, |
| 71 | + "rw": false, |
| 72 | + "w": false, |
| 73 | + "is": false, |
| 74 | + "type": "javax.management.openmbean.CompositeData", |
| 75 | + "desc": "HeapMemoryUsage" |
| 76 | + }, |
| 77 | + "NonHeapMemoryUsage": { |
| 78 | + "r": true, |
| 79 | + "rw": false, |
| 80 | + "w": false, |
| 81 | + "is": false, |
| 82 | + "type": "javax.management.openmbean.CompositeData", |
| 83 | + "desc": "NonHeapMemoryUsage" |
| 84 | + }, |
| 85 | + ... |
| 86 | + }, |
| 87 | + "status": 200, |
| 88 | + "timestamp": 1770722333 |
| 89 | +} |
| 90 | +---- |
| 91 | +
|
| 92 | +And here's what we get with Jolokia 2.5.0: |
| 93 | +
|
| 94 | +[,json] |
| 95 | +---- |
| 96 | +{ |
| 97 | + "request": { |
| 98 | + "path": "java.lang/type=Memory/attr", |
| 99 | + "type": "list" |
| 100 | + }, |
| 101 | + "value": { |
| 102 | + ... |
| 103 | + "HeapMemoryUsage": { |
| 104 | + "r": true, |
| 105 | + "rw": false, |
| 106 | + "w": false, |
| 107 | + "is": false, |
| 108 | + "type": "javax.management.openmbean.CompositeData", |
| 109 | + "desc": "HeapMemoryUsage", |
| 110 | + "openType": { |
| 111 | + "kind": "composite", |
| 112 | + "type": "java.lang.management.MemoryUsage", |
| 113 | + "class": "javax.management.openmbean.CompositeData", |
| 114 | + "items": { |
| 115 | + "init": "java.lang.Long", |
| 116 | + "committed": "java.lang.Long", |
| 117 | + "max": "java.lang.Long", |
| 118 | + "used": "java.lang.Long" |
| 119 | + }, |
| 120 | + "desc": "java.lang.management.MemoryUsage" |
| 121 | + } |
| 122 | + }, |
| 123 | + ... |
| 124 | + }, |
| 125 | + "status": 200, |
| 126 | + "timestamp": 1770722390 |
| 127 | +} |
| 128 | +---- |
| 129 | +
|
| 130 | +==== JMX Adaptor improvements |
| 131 | +
|
| 132 | +We've reviewed entire code for https://docs.oracle.com/en/java/javase/17/docs/api/java.management/javax/management/remote/JMXConnector.html[JMX Connector (Client)] implementation. + |
| 133 | +Unified (de)serialization mechanism is now used in this module. With additional information on the Open Types used by the MBeans, Jolokia works much better with tools like JConsole. |
| 134 | +
|
| 135 | +Additionally we've introduced a declarative way of configuring the Jolokia Client used by Jolokia JMX Adaptor. When using JConsole with Jolokia, we can easily configure TLS support using system properties or environment variables. |
| 136 | +
|
| 137 | +For example we can run `jconsole` with this command line: |
| 138 | +[,shell] |
| 139 | +---- |
| 140 | +$ JOLOKIA_CLIENT_KEY_PASSWORD=jolokia \ |
| 141 | + jconsole \ |
| 142 | + -J-Dswing.defaultlaf=javax.swing.plaf.metal.MetalLookAndFeel \ |
| 143 | + -J-Dsun.java2d.uiScale=3 \ |
| 144 | + -J-Djava.class.path=$HOME/.m2/repository/org/jolokia/jolokia-client-jmx-adapter/2.5.0/jolokia-client-jmx-adapter-2.5.0-standalone.jar \ |
| 145 | + -J-Djolokia.caCertificate=ca.cer.pem \ |
| 146 | + -J-Djolokia.clientCertificate=client.cer.pem \ |
| 147 | + -J-Djolokia.clientKey=client-private.key-pk8.pem |
| 148 | +---- |
| 149 | +
|
| 150 | +Certificates and private keys (DER or PEM format, encrypted or plain) can be used without a need to build Java keystores. |
| 151 | +
|
| 152 | +==== Improved exception handling |
| 153 | +
|
| 154 | +We've reviewed exception handling code. All errors caused by malformed using input (invalid JSON, unknown processing parameters) cause HTTP 400 error (`Bad Request`). + |
| 155 | +All JMX errors (except security issues) cause Jolokia error which include an actual JMX exception - so we can better implement the `javax.management.MBeanServerConnection` contract. |
| 156 | +
|
| 157 | +==== Spring Boot 4 / Spring Framework 7 support |
| 158 | +
|
| 159 | +Due to https://spring.io/blog/2025/10/28/modularizing-spring-boot[Spring Boot 4 modularization effort], we had to alter the way Jolokia is registered as an actuator endpoint. We didn't stop supporting Spring Boot 3, but we now include two separate modules: |
| 160 | +
|
| 161 | +* `org.jolokia:jolokia-support-springboot3` - for legacy Spring Boot 3 support |
| 162 | +* `org.jolokia:jolokia-support-springboot` - for Spring Boot 4 (and hopefully next versions) |
| 163 | +
|
| 164 | +Before Jolokia 2.5.0 we had only one `org.jolokia:jolokia-support-spring` module. And again, breaking (a bit) Semantic Versioning principles, we've renamed the module to highlight that it's actually for Spring Boot (and not only for Spring Framework). |
| 165 | +
|
| 166 | +==== Documentation improvements |
| 167 | +
|
| 168 | +And last, but not least, we've finally reviewed the documentation updating chapters about Jolokia Client, serialization, the Jolokia protocol and others. |
| 169 | +
|
| 170 | +Refer to https://jolokia.org/changes-report.html#a2.5.0[changelog] and https://github.com/jolokia/jolokia/releases/tag/v2.5.0[GitHub release notes] for more details. |
| 171 | +
|
18 | 172 | === Jolokia 2.4.2 released |
19 | 173 |
|
20 | 174 | [.news-date] |
|
0 commit comments