Skip to content

Commit ffb70dd

Browse files
Merge pull request #4350 from OpenLiberty/staging
Publish 25.0.0.4-beta blog post
2 parents 129f941 + 89b28a3 commit ffb70dd

3 files changed

+262
-9
lines changed

blog_tags.json

+10-7
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"blog_tags": [
33
{
44
"name": "announcements",
5-
"posts": ["25.0.0.3", "open-liberty-cloud-hosted-guides-multi-languages",
5+
"posts": ["25.0.0.4-beta", "25.0.0.3", "open-liberty-cloud-hosted-guides-multi-languages",
66
"25.0.0.3-beta", "25.0.0.2",
77
"25.0.0.2-beta", "25.0.0.1",
88
"25.0.0.1-beta", "24.0.0.12",
@@ -89,7 +89,7 @@
8989
"featured": "true"
9090
},{
9191
"name": "microprofile",
92-
"posts": ["microprofile-telemetry-20",
92+
"posts": ["25.0.0.4-beta", "microprofile-telemetry-20",
9393
"25.0.0.2-beta", "cloudant-with-open-liberty",
9494
"microprofile-7", "24.0.0.12",
9595
"24.0.0.10", "24.0.0.9",
@@ -161,7 +161,7 @@
161161
},
162162
{
163163
"name": "java-se",
164-
"posts": ["24.0.0.10",
164+
"posts": ["25.0.0.4-beta", "24.0.0.10",
165165
"24.0.0.10-beta", "24.0.0.4",
166166
"24.0.0.4-beta", "24.0.0.3",
167167
"24.0.0.1", "Java21-Images",
@@ -179,7 +179,8 @@
179179
},
180180
{
181181
"name": "release",
182-
"posts": ["25.0.0.3", "25.0.0.3-beta",
182+
"posts": ["25.0.0.4-beta",
183+
"25.0.0.3", "25.0.0.3-beta",
183184
"25.0.0.2", "25.0.0.2-beta",
184185
"25.0.0.1", "25.0.0.1-beta",
185186
"24.0.0.12", "24.0.0.12-beta",
@@ -247,7 +248,7 @@
247248
},
248249
{
249250
"name": "beta",
250-
"posts": ["25.0.0.3-beta",
251+
"posts": ["25.0.0.4-beta", "25.0.0.3-beta",
251252
"25.0.0.2-beta", "25.0.0.1-beta",
252253
"24.0.0.12-beta", "24.0.0.11-beta",
253254
"24.0.0.10-beta", "24.0.0.9-beta",
@@ -565,7 +566,8 @@
565566
},
566567
{
567568
"name": "monitoring",
568-
"posts": ["microprofile-telemetry-20", "25.0.0.2-beta",
569+
"posts": ["25.0.0.4-beta",
570+
"microprofile-telemetry-20", "25.0.0.2-beta",
569571
"microprofile-7", "24.0.0.9",
570572
"24.0.0.8", "24.0.0.8-beta",
571573
"24.0.0.7-beta", "24.0.0.3",
@@ -638,7 +640,8 @@
638640
},
639641
{
640642
"name": "java-ee",
641-
"posts": ["24.0.0.8", "24.0.0.8-beta",
643+
"posts": ["25.0.0.4-beta",
644+
"24.0.0.8", "24.0.0.8-beta",
642645
"history-maker-projects", "space-sentry-challenge",
643646
"jakarta-ee-9.1-210012", "KevinSutter_MeetTheTeam",
644647
"jakarta-ee-9-1-compatibility", "testing-jakarta-Arquillian-redirect",

posts/2023-02-17-using-liberty-buildpack-on-azure-and-google-cloud.adoc

+2-2
Original file line numberDiff line numberDiff line change
@@ -52,10 +52,10 @@ For example, your project descriptor might contain the following content to use
5252
value = "jsonb-2.0 mpconfig-3.0 mpmetrics-4.0 restfulws-3.0 jsonp-2.0 cdi-3.0"
5353

5454
[[build.buildpacks]]
55-
uri = "docker://gcr.io/paketo-buildpacks/eclipse-openj9"
55+
uri = "docker://docker.io/paketobuildpacks/eclipse-openj9"
5656

5757
[[build.buildpacks]]
58-
uri = "docker://gcr.io/paketo-buildpacks/java"
58+
uri = "docker://docker.io/paketobuildpacks/java"
5959
```
6060

6161
== Build and push a container image with Azure

posts/2025-04-08-25.0.0.4-beta.adoc

+250
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,250 @@
1+
---
2+
layout: post
3+
title: "Support for Java 24, file-based health checks with MicroProfile Health, and more in 25.0.0.4-beta"
4+
categories: blog
5+
author_picture: https://avatars3.githubusercontent.com/navaneethsnair1
6+
author_github: https://github.com/navaneethsnair1
7+
seo-title: Support for Java 24, file-based health checks with MicroProfile Health, and more in 25.0.0.4-beta - OpenLiberty.io
8+
seo-description: This beta release adds Java 24 support, access logging with OpenTelemetry, and file-based health checks for MicroProfile Health. Java EE 7 and 8 support for MicroProfile Health 4.0 and new InstantOn features are also included.
9+
blog_description: This beta release adds Java 24 support, access logging with OpenTelemetry, and file-based health checks for MicroProfile Health. Java EE 7 and 8 support for MicroProfile Health 4.0 and new InstantOn features are also included.
10+
open-graph-image: https://openliberty.io/img/twitter_card.jpg
11+
open-graph-image-alt: Open Liberty Logo
12+
---
13+
= Support for Java 24, file-based health checks with MicroProfile Health, and more in 25.0.0.4-beta
14+
Navaneeth S Nair <https://github.com/navaneethsnair1>
15+
:imagesdir: /
16+
:url-prefix:
17+
:url-about: /
18+
19+
This beta release adds Java 24 support, access logging with OpenTelemetry, and file-based health checks for MicroProfile Health. Java EE 7 and 8 support for MicroProfile Health 4.0 and new InstantOn features are also included.
20+
21+
The link:{url-about}[Open Liberty] 25.0.0.4-beta includes the following beta features (along with link:{url-prefix}/docs/latest/reference/feature/feature-overview.html[all GA features]):
22+
23+
* <<beta, Run your Liberty apps with Java 24>>
24+
* <<telemetry, Send Liberty HTTP access logs to OpenTelemetry using MicroProfile Telemetry 2.0>>
25+
* <<backport, File-based health checks and Java EE 7 and 8 compatibility for MicroProfile Health 4.0>>
26+
* <<support, InstantOn Support for J2EEManagement, AppClientSupport and WsSecurity>>
27+
28+
29+
See also link:{url-prefix}/blog/?search=beta&key=tag[previous Open Liberty beta blog posts].
30+
31+
[#beta]
32+
== Run your Liberty apps with Java 24
33+
34+
Released on 18 March 2025, Java 24 introduces many new features and enhancements over previous versions of Java. However, since Java 24 is not a Long-Term Support (LTS) release, support for it will end when the next version of Java is supported. It offers many features worth checking out.
35+
36+
link:https://openjdk.org/projects/jdk/24/[Java 24] includes the following changes:
37+
38+
* 404: link:https://openjdk.org/jeps/404[Generational Shenandoah (Experimental)]
39+
* 450: link:https://openjdk.org/jeps/450[Compact Object Headers (Experimental)]
40+
* 472: link:https://openjdk.org/jeps/472[Prepare to Restrict the Use of JNI]
41+
* 475: link:https://openjdk.org/jeps/475[Late Barrier Expansion for G1]
42+
* 478: link:https://openjdk.org/jeps/478[Key Derivation Function API (Preview)]
43+
* 479: link:https://openjdk.org/jeps/479[Remove the Windows 32-bit x86 Port]
44+
* 483: link:https://openjdk.org/jeps/483[Ahead-of-Time Class Loading & Linking]
45+
* 484: link:https://openjdk.org/jeps/484[Class-File API]
46+
* 485: link:https://openjdk.org/jeps/485[Stream Gatherers]
47+
* 486: link:https://openjdk.org/jeps/486[Permanently Disable the Security Manager]
48+
* 487: link:https://openjdk.org/jeps/487[Scoped Values (Fourth Preview)]
49+
* 488: link:https://openjdk.org/jeps/488[Primitive Types in Patterns, instanceof, and switch (Second Preview)]
50+
* 489: link:https://openjdk.org/jeps/489[Vector API (Ninth Incubator)]
51+
* 490: link:https://openjdk.org/jeps/490[ZGC: Remove the Non-Generational Mode]
52+
* 491: link:https://openjdk.org/jeps/491[Synchronize Virtual Threads without Pinning]
53+
* 492: link:https://openjdk.org/jeps/492[Flexible Constructor Bodies (Third Preview)]
54+
* 493: link:https://openjdk.org/jeps/493[Linking Run-Time Images without JMODs]
55+
* 494: link:https://openjdk.org/jeps/494[Module Import Declarations (Second Preview)]
56+
* 495: link:https://openjdk.org/jeps/495[Simple Source Files and Instance Main Methods (Fourth Preview)]
57+
* 496: link:https://openjdk.org/jeps/496[Quantum-Resistant Module-Lattice-Based Key Encapsulation Mechanism]
58+
* 497: link:https://openjdk.org/jeps/497[Quantum-Resistant Module-Lattice-Based Digital Signature Algorithm]
59+
* 498: link:https://openjdk.org/jeps/498[Warn upon Use of Memory-Access Methods in sun.misc.Unsafe]
60+
* 499: link:https://openjdk.org/jeps/499[Structured Concurrency (Fourth Preview)]
61+
* 501: link:https://openjdk.org/jeps/501[Deprecate the 32-bit x86 Port for Removal]
62+
63+
Take advantage of the changes in Java 24 in Open Liberty now and get more time to review your applications, microservices, and runtime environments on your favorite server runtime!
64+
65+
To start using Java 24 with Open Liberty, link:https://adoptium.net/temurin/releases/?version=24[download the latest Java 24 release], and install the link:{url-prefix}/downloads/#runtime_betas[25.0.0.4-beta] version of Open Liberty. Then, edit your Liberty link:{url-prefix}/docs/latest/reference/config/server-configuration-overview.html#server-env[server.env] file to point `JAVA_HOME` to your Java 24 installation and start testing. The 25.0.0.4-beta release introduces beta support for Java 24. As we work toward full Java 24 support, bear with any of our implementations of these functions that might not be ready yet.
66+
67+
For more information on Java 24, see the following resources:
68+
69+
- link:https://jdk.java.net/24/release-notes[Release notes]
70+
- link:https://docs.oracle.com/en/java/javase/24/docs/api/index.html[Javadocs]
71+
- link:https://adoptium.net/temurin/releases/?version=24[Download page].
72+
73+
[#telemetry]
74+
== Send Liberty HTTP access logs to OpenTelemetry using MicroProfile Telemetry 2.0
75+
76+
link:https://openliberty.io/docs/latest/microprofile-telemetry.html[MicroProfile Telemetry 2.0] (`mpTelemetry-2.0`) enables OpenTelemetry to collect and export traces, metrics, and logs.
77+
78+
You can now use the `mpTelemetry-2.0` feature to collect link:https://openliberty.io/docs/latest/access-logging.html[Liberty HTTP access logs] to OpenTelemetry. This new log source is in addition to the previously available Open Liberty runtime log sources (messages, traces, ffdcs, audit) and application logs generated by the `java.util.logging` (JUL) API.
79+
80+
To enable the MicroProfile Telemetry 2.0 feature to collect HTTP access logs, enable the feature and configure the `httpEndpoint` and optionally the `httpAccessLogging` configuration elements. Include the new `accessLog` value in the `source` attribute of the `mpTelemtry` configuration element. Also set the `accessLogFields` attribute to `default` or `logFormat` for the `mpTelemetry` configuration element, as shown in the following `server.xml` example:
81+
82+
[source,xml]
83+
----
84+
<featureManager>
85+
<feature>mpTelemetry-2.0</feature>
86+
...
87+
</featureManager>
88+
89+
<httpAccessLogging id="accessLogging" logFormat='%h %u %{t}W "%r" %s %b %D %{R}W'/>
90+
<httpEndpoint id="defaultHttpEndpoint" accessLoggingRef="accessLogging" httpPort="9080" httpsPort="9443"/>
91+
92+
<mpTelemetry accessLogFields="logFormat" source="message,trace,ffdc,accessLog"/>
93+
----
94+
95+
96+
[#backport]
97+
== File-based health checks and Java EE 7 and 8 compatibility for MicroProfile Health 4.0
98+
99+
The MicroProfile Health 4.0 feature (`mpHealth-4.0`) enables a runtime for the Open Liberty server that previously supported only Jakarta EE 9 or later. In this beta release, the `mpHealth-4.0` feature is now also supported within Java EE 7 and EE 8 environments. Also, a file-based health check mechanism is introduced as an alternative to using the `/health/*` REST endpoints.
100+
101+
The MicroProfile Health technology is most effective when the application is deployed onto a Kubernetes based environment where link:https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/['Liveness', 'Readiness' and 'Startup' Probes] can be used. In such a deployment scenario, applications that are deployed might be on different Java and Jakarta EE levels. This configuration can result in a mixture of `mpHealth-x.x` features across different servers and different Kubernetes probe configurations. The `mpHealth-4.0` feature is now compatible for use with Java EE 7 and Java EE 8 alongside its existing support for Jakarta EE 9 and Jakarta EE 10 environments. This feature hence unifies Open Liberty server configurations and Kubernetes Health Check probe configurations.
102+
103+
In addition to the link:https://openliberty.io/docs/latest/health-check-microservices.html[existing strategy] of querying the `/health/live`, `/health/ready`, `/health/started` REST endpoints, the 25.0.0.4-beta release introduces an alternative file-based health check functionality. When this function is enabled, the `live`, `ready`, and `started` files are created under the `${server.output.dir}/health` directory. The `${server.output.dir}` defaults to `wlp/usr/servers/<server>`. For more information, see link:{url-prefix}/docs/latest/reference/directory-locations-properties.html[Directory locations and properties].
104+
105+
The `started` file is created when the application startup health checks return an `UP` status. Similarly, the `live` and `ready` files are created when the application liveness and readiness health checks return an `UP` status. The runtime then continues querying the liveness and readiness health checks at a user-defined interval. If the status returns `UP`, the last modified time of the file is updated. If a file is not updated, then it indicates that a `DOWN` status was returned.
106+
107+
This file-based functionality is only enabled if a user configures the `fileUpdateInterval` configuration attribute for the `mpHealth` configuration element or the `MP_HEALTH_FILE_UPDATE_INTERVAL` link:https://openliberty.io/docs/latest/reference/config/server-configuration-overview.html#server-env[environment variable]. If both the environment variable and the `fileUpdateInterval` attribute are configured, the `server.xml` takes precedence at run time. The configuration accepts a number followed by an optional `ms` or `s` to denote the time unit. If no time unit is specified, it defaults to seconds. Invalid values default the interval to 10 seconds.
108+
109+
The following example shows the `server.xml` configuration:
110+
111+
[source,xml]
112+
----
113+
<server>
114+
<features>
115+
<feature>mphealth-4.0</feature>
116+
</features>
117+
<mpHealth fileUpdateInterval="10s"/>
118+
</server>
119+
----
120+
121+
With file-based checks, you can use the exec command strategy instead of the `httpGet` or `gRPC` strategy when you configure the Kubernetes health check probes. For best results, configure the startup probe to check for the existence of the `started` file. Also, set the probe interval for the liveness and readiness probes to at least 1.5 times greater than the `fileUpdateInterval` configuration. The `exec` command checks for the existence of the file and checks if the file is modified within the duration of the probe interval. The `${server.output.dir}` in an Open Liberty container is `/opt/ol/wlp/output/defaultServer` or simply `/output`.
122+
123+
For example, if an OpenLiberty application image is configured and deployed where the `fileUpdateInterval` attribute is set to 10 seconds, you can use a Kubernetes configuration similar to the following example:
124+
125+
[source,yaml]
126+
----
127+
probes:
128+
startup:
129+
exec:
130+
command:
131+
- /bin/sh
132+
- '-c'
133+
- file=/output/health/started; cat $file
134+
failureThreshold: 5
135+
initialDelaySeconds: 15
136+
periodSeconds: 15
137+
timeoutSeconds: 5
138+
liveness:
139+
exec:
140+
command:
141+
- /bin/sh
142+
- '-c'
143+
- file=/output/health/live; x=$(cat $file) && mts=$(stat --format=%.3Y $file | tr -d ".") && if [ $(expr $(date +%s%3N) - $mts) -gt 15000 ] ; then (exit 1) ; else (exit 0) ; fi
144+
failureThreshold: 3
145+
initialDelaySeconds: 10
146+
periodSeconds: 15
147+
timeoutSeconds: 5
148+
readiness:
149+
exec:
150+
command:
151+
- /bin/sh
152+
- '-c'
153+
- file=/output/health/ready; x=$(cat $file) && mts=$(stat --format=%.3Y $file | tr -d ".") && if [ $(expr $(date +%s%3N) - $mts) -gt 15000 ] ; then (exit 1) ; else (exit 0) ; fi
154+
failureThreshold: 3
155+
initialDelaySeconds: 10
156+
periodSeconds: 15
157+
timeoutSeconds: 5
158+
----
159+
160+
Notice that in the liveness and readiness probes, the `periodSeconds` is set to 15, or 1.5x the `fileUpdateInterval`, and the check that the file was last modified within the 15 seconds, or the `-gt 15000` part of the command.
161+
162+
163+
[#support]
164+
== InstantOn Support for J2EEManagement, AppClientSupport and WsSecurity
165+
166+
Open Liberty link:{url-prefix}/docs/latest/instanton.html[InstantOn] provides fast startup times for MicroProfile and Jakarta EE applications. With InstantOn, your applications can start in milliseconds, without compromising on throughput, memory, development-production parity, or Java language features. InstantOn uses the Checkpoint/Restore In Userspace (link:https://criu.org/[CRIU]) feature of the Linux kernel to take a checkpoint of the JVM that can be restored later. InstantOn supports link:{url-prefix}/docs/latest/instanton.html#supported-features[a subset of Open Liberty features]. As of the 25.0.0.4-beta release, the following features are enhanced to support InstantOn.
167+
168+
- link:{url-prefix}/docs/latest/reference/feature/j2eeManagement-1.1.html[J2EE Management 1.1 (j2eeManagement-1.1)]
169+
- link:{url-prefix}/docs/latest/reference/feature/appClientSupport-1.0.html[Application Client Support for Server 1.0 (appClientSupport-1.0)]
170+
- link:{url-prefix}/docs/latest/reference/feature/appClientSupport-2.0.html[Jakarta Application Client Support for Server 2.0 (appClientSupport-2.0)]
171+
- link:{url-prefix}/docs/latest/reference/feature/wsSecurity-1.1.html[Web Service Security 1.1 (wsSecurity-1.1)]
172+
173+
[#run]
174+
=== Try it now
175+
176+
To try out these features, update your build tools to pull the Open Liberty All Beta Features package instead of the main release. The beta works with Java SE 24, Java SE 21, Java SE 17, Java SE 11, and Java SE 8.
177+
178+
If you're using link:{url-prefix}/guides/maven-intro.html[Maven], you can install the All Beta Features package using:
179+
180+
[source,xml]
181+
----
182+
<plugin>
183+
<groupId>io.openliberty.tools</groupId>
184+
<artifactId>liberty-maven-plugin</artifactId>
185+
<version>3.11.3</version>
186+
<configuration>
187+
<runtimeArtifact>
188+
<groupId>io.openliberty.beta</groupId>
189+
<artifactId>openliberty-runtime</artifactId>
190+
<version>25.0.0.4-beta</version>
191+
<type>zip</type>
192+
</runtimeArtifact>
193+
</configuration>
194+
</plugin>
195+
----
196+
197+
You must also add dependencies to your `pom.xml` file for the beta version of the APIs that are associated with the beta features that you want to try. For example, the following block adds dependencies for two example beta APIs:
198+
199+
[source,xml]
200+
----
201+
<dependency>
202+
<groupId>org.example.spec</groupId>
203+
<artifactId>exampleApi</artifactId>
204+
<version>7.0</version>
205+
<type>pom</type>
206+
<scope>provided</scope>
207+
</dependency>
208+
<dependency>
209+
<groupId>example.platform</groupId>
210+
<artifactId>example.example-api</artifactId>
211+
<version>11.0.0</version>
212+
<scope>provided</scope>
213+
</dependency>
214+
----
215+
216+
Or for link:{url-prefix}/guides/gradle-intro.html[Gradle]:
217+
218+
[source,gradle]
219+
----
220+
buildscript {
221+
repositories {
222+
mavenCentral()
223+
}
224+
dependencies {
225+
classpath 'io.openliberty.tools:liberty-gradle-plugin:3.9.3'
226+
}
227+
}
228+
apply plugin: 'liberty'
229+
dependencies {
230+
libertyRuntime group: 'io.openliberty.beta', name: 'openliberty-runtime', version: '[25.0.0.4-beta,)'
231+
}
232+
----
233+
234+
Or if you're using link:{url-prefix}/docs/latest/container-images.html[container images]:
235+
236+
[source]
237+
----
238+
FROM icr.io/appcafe/open-liberty:beta
239+
----
240+
241+
Or take a look at our link:{url-prefix}/downloads/#runtime_betas[Downloads page].
242+
243+
If you're using link:https://plugins.jetbrains.com/plugin/14856-liberty-tools[IntelliJ IDEA], link:https://marketplace.visualstudio.com/items?itemName=Open-Liberty.liberty-dev-vscode-ext[Visual Studio Code] or link:https://marketplace.eclipse.org/content/liberty-tools[Eclipse IDE], you can also take advantage of our open source link:{url-prefix}/docs/latest/develop-liberty-tools.html[Liberty developer tools] to enable effective development, testing, debugging and application management all from within your IDE.
244+
245+
For more information on using a beta release, refer to the link:{url-prefix}docs/latest/installing-open-liberty-betas.html[Installing Open Liberty beta releases] documentation.
246+
247+
[#feedback]
248+
== We welcome your feedback
249+
250+
Let us know what you think on link:https://groups.io/g/openliberty[our mailing list]. If you hit a problem, link:https://stackoverflow.com/questions/tagged/open-liberty[post a question on StackOverflow]. If you hit a bug, link:https://github.com/OpenLiberty/open-liberty/issues[please raise an issue].

0 commit comments

Comments
 (0)