Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions blog_tags.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"blog_tags": [
{
"name": "announcements",
"posts": ["25.0.0.9", "25.0.0.9-beta",
"posts": ["25.0.0.10-beta", "25.0.0.9", "25.0.0.9-beta",
"25.0.0.8", "25.0.0.7",
"25.0.0.7-beta", "25.0.0.6",
"25.0.0.6-beta", "25.0.0.5",
Expand Down Expand Up @@ -169,7 +169,7 @@
},
{
"name": "java-se",
"posts": ["25.0.0.6", "25.0.0.6-beta", "25.0.0.4",
"posts": ["25.0.0.10-beta", "25.0.0.6", "25.0.0.6-beta", "25.0.0.4",
"25.0.0.4-beta", "24.0.0.10",
"24.0.0.10-beta", "24.0.0.4",
"24.0.0.4-beta", "24.0.0.3",
Expand All @@ -188,7 +188,7 @@
},
{
"name": "release",
"posts": ["25.0.0.9", "25.0.0.9-beta",
"posts": ["25.0.0.10-beta","25.0.0.9", "25.0.0.9-beta",
"25.0.0.8", "25.0.0.7",
"25.0.0.7-beta", "25.0.0.6",
"25.0.0.6-beta", "25.0.0.5",
Expand Down Expand Up @@ -261,7 +261,8 @@
},
{
"name": "beta",
"posts": ["25.0.0.9-beta", "25.0.0.7-beta", "25.0.0.6-beta",
"posts": ["25.0.0.10-beta","25.0.0.9-beta",
"25.0.0.7-beta", "25.0.0.6-beta",
"25.0.0.4-beta", "25.0.0.3-beta",
"25.0.0.2-beta", "25.0.0.1-beta",
"24.0.0.12-beta", "24.0.0.11-beta",
Expand Down
38 changes: 15 additions & 23 deletions posts/2025-09-23-25.0.0.10-beta.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ categories: blog
author_picture: https://avatars3.githubusercontent.com/IsmathBadsha
author_github: https://github.com/IsmathBadsha
seo-title: Support for override library in the application classloader and support for Java 25 in 25.0.0.10-beta - OpenLiberty.io
seo-description: Support for override libraries in the application classloader and Java 25 compatibility are introduced in 25.0.0.10-beta.
blog_description: Support for override libraries in the application classloader and Java 25 compatibility are introduced in 25.0.0.10-beta.
seo-description: Support for override libraries in the application classloader to fix the application without requiring the application to be rebuilt and Java 25 compatibility are introduced in 25.0.0.10-beta.
blog_description: Support for override libraries in the application classloader to fix the application without requiring the application to be rebuilt and Java 25 compatibility are introduced in 25.0.0.10-beta.
open-graph-image: https://openliberty.io/img/twitter_card.jpg
open-graph-image-alt: Open Liberty Logo
---
Expand Down Expand Up @@ -50,7 +50,7 @@ Ismath Badsha <https://github.com/IsmathBadsha>
// change the "IMAGE CAPTION" to a couple words of what the image is
// // // // // // // //

Support for override libraries in the application classloader and Java 25 compatibility are introduced in 25.0.0.10-beta.
Support for override libraries in the application classloader to fix the application without requiring the application to be rebuilt and Java 25 compatibility are introduced in 25.0.0.10-beta.

// // // // // // // //
// Change the RELEASE_SUMMARY to an introductory paragraph. This sentence is really
Expand All @@ -61,7 +61,7 @@ Support for override libraries in the application classloader and Java 25 compat

The link:{url-about}[Open Liberty] 25.0.0.10-beta includes the following beta features (along with link:{url-prefix}/docs/latest/reference/feature/feature-overview.html[all GA features]):

* <<overrideLibrary, overrideLibrary support for application classloader>>
* <<overrideLibrary, OverrideLibrary support for application classloader>>
* <<beta_support_java25, Beta support for Java 25>>

// // // // // // // //
Expand All @@ -80,9 +80,9 @@ See also link:{url-prefix}/blog/?search=beta&key=tag[previous Open Liberty beta
// Contact/Reviewer: tjwatson
// // // // // // // //
[#overrideLibrary]
== overrideLibrary support for application classloader
== OverrideLibrary support for application classloader

The 25.0.0.10-beta release introduces a new type of library reference for configuring an application's <classloader/>. This new reference type is called an override library reference. An override library reference works similarly to a private library reference, where class instances remain unique to the application's classloader. However, the key difference is in the search order, the override library class path is searched before the application’s own class path.This allows the library path to override classes that are already contained within the application.
The 25.0.0.10-beta release introduces a new type of library reference for configuring an application's `<classloader/>`. This new reference type is called an override library reference. An override library reference works similarly to a private library reference, where class instances remain unique to the application's classloader. However, the key difference is in the search order, the override library class path is searched before the application’s own class path.This allows the library path to override classes that are already contained within the application.

For example, when a `<webApplication/>` contains a class like `org.acme.needs.fix.SomeImpl` that needs to be overridden in order to fix an issue, but rebuilding the application to include the fix is difficult or undesirable,as a new library JAR (e.g., someImplFix.jar) is built to include the corrected class files. Then the following `server.xml` could be used to configure an `overrideLibraryRef` to fix the application without requiring the application to be rebuilt:

Expand All @@ -107,7 +107,7 @@ For example, when a `<webApplication/>` contains a class like `org.acme.needs.fi
[#beta_support_java25]
== Beta support for Java 25

Java 25 is the latest version of Java and a Long-Term-Support (LTS) release. It contains many new features and enhancements over previous versions of Java that you will want to review.
Java 25 is the latest version of Java and a Long-Term-Support (LTS) release. It contains many new features and enhancements over previous versions of Java.

There are 18 new features (JEPs) in link:https://openjdk.org/projects/jdk/25/[Java 25]. Six are test features and twelve are fully delivered:

Expand Down Expand Up @@ -135,19 +135,20 @@ Delivered features:
* 520: link:https://openjdk.org/jeps/520[JFR Method Timing & Tracing]
* 521: link:https://openjdk.org/jeps/521[Generational Shenandoah]

An important note about using the `CompletableFuture` and `SubmissionPublisher` classes provided in the Java 25 JDK. If you do not have an explicit Executor backing them, the default is to use the `ForkJoinPool.commonPool`.The pool defaults to a parallelism value equal to the number of available processors minus 1 (# available processors - 1). If your application runs in an environment where you have 2 (or fewer) processors, you could run into issues with concurrency in Java 25 since you will only have 1 thread available by default. This was not an issue in earlier versions of Java as the JDK would overlook the parallelism value and create an additional thread.
To avoid this, you can:
1. Use the `CompletableFuture` provided in Liberty's Jakarta Concurrency implementation, which does not have this issue. An easy way to do that is with a link:https://www.ibm.com/docs/en/was-liberty/core?topic=manually-configuring-managed-executors[DefaultManagedExecutorService] and using link:https://jakarta.ee/specifications/concurrency/3.1/apidocs/jakarta.concurrency/jakarta/enterprise/concurrent/managedexecutorservice#supplyAsync(java.util.function.Supplier[supplyAsync or runAsync]).
2. Explicitly set the `ForkJoinPool.commonPool` parallelism value to whatever you need, `-Djava.util.concurrent.ForkJoinPool.common.parallelism=N` (where N is the minimum number of threads needed)
3. Use an explicit backing Executor
An important note about using the `CompletableFuture` and `SubmissionPublisher` classes in Java 25 JDK is that if there is no explicit Executor backing these classes, by default `ForkJoinPool.commonPool` will be used. The pool defaults to a parallelism value equal to the number of available processors minus 1 (# available processors - 1). If the application runs in an environment with 2 (or fewer) processors, there is a possibility of running into concurrency issue since Java 25 uses only 1 thread by default. This was not an issue in earlier versions of Java as the JDK would overlook the parallelism value and create an additional thread.

The above issue can be avoided by following the below steps:

. Use the `CompletableFuture` provided in Liberty's Jakarta Concurrency implementation, which does not have this issue. An easy way to do that is with a link:https://www.ibm.com/docs/en/was-liberty/core?topic=manually-configuring-managed-executors[DefaultManagedExecutorService] and using link:https://jakarta.ee/specifications/concurrency/3.1/apidocs/jakarta.concurrency/jakarta/enterprise/concurrent/managedexecutorservice#supplyAsync(java.util.function.Supplier[supplyAsync or runAsync]).
. Explicitly set the `ForkJoinPool.commonPool` parallelism value to whatever you need, `-Djava.util.concurrent.ForkJoinPool.common.parallelism=N` (where N is the minimum number of threads needed)
. Use an explicit backing Executor

For more information about this change, please reference the following links:
https://bugs.openjdk.org/browse/JDK-8362881
https://bugs.openjdk.org/browse/JDK-8319447
https://bugs.openjdk.org/browse/JDK-8360593


Since Java 25 is a milestone release of Java, we thought you might like to try it out a little early. So take advantage of trying out the new changes now and get more time to preview your applications and microservices running with Java 25.
Take advantage of the changes in Java 25 in Open Liberty now and get more time to review your applications, microservices, and runtime environments on your favorite server runtime!

Just link:https://jdk.java.net/25/[download the latest release of Java 25], download and install the link:https://openliberty.io/downloads/#runtime_betas[25.0.0.10-beta] version of Open Liberty, edit your Liberty server's link:https://openliberty.io/docs/latest/reference/config/server-configuration-overview.html#server-env[server.env] file with JAVA_HOME set to your Java 25 installation directory and start testing!

Expand All @@ -157,15 +158,6 @@ For more information on Open Liberty, please visit our link:https://openliberty.

// DO NOT MODIFY THIS LINE. </GHA-BLOG-TOPIC>



To enable the new beta features in your app, add them to your `server.xml`:

[source, xml]
----

----

[#run]
=== Try it now

Expand Down