Skip to content

Commit 41710f9

Browse files
authored
Merge pull request #4537 from OpenLiberty/25.0.0.10-beta-post
review_comments
2 parents 68e4680 + 24f69c6 commit 41710f9

File tree

1 file changed

+18
-17
lines changed

1 file changed

+18
-17
lines changed

posts/2025-09-23-25.0.0.10-beta.adoc

Lines changed: 18 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ categories: blog
66
author_picture: https://avatars3.githubusercontent.com/IsmathBadsha
77
author_github: https://github.com/IsmathBadsha
88
seo-title: Support for override library in the application classloader and support for Java 25 in 25.0.0.10-beta - OpenLiberty.io
9-
seo-description: Support for override library 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.
10-
blog_description: Support for override library 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.
9+
seo-description: Support for the override library in the application classloader that allows fixing applications without rebuilding them, and Java 25 compatibility are introduced in version 25.0.0.10-beta.
10+
blog_description: Support for the override library in the application classloader that allows fixing applications without rebuilding them, and Java 25 compatibility are introduced in version 25.0.0.10-beta.
1111
open-graph-image: https://openliberty.io/img/twitter_card.jpg
1212
open-graph-image-alt: Open Liberty Logo
1313
---
@@ -50,7 +50,7 @@ Ismath Badsha <https://github.com/IsmathBadsha>
5050
// change the "IMAGE CAPTION" to a couple words of what the image is
5151
// // // // // // // //
5252

53-
Support for override library 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.
53+
Support for the override library in the application classloader that allows fixing applications without rebuilding them, and Java 25 compatibility are introduced in version 25.0.0.10-beta.
5454

5555
// // // // // // // //
5656
// Change the RELEASE_SUMMARY to an introductory paragraph. This sentence is really
@@ -82,9 +82,9 @@ See also link:{url-prefix}/blog/?search=beta&key=tag[previous Open Liberty beta
8282
[#overrideLibrary]
8383
== OverrideLibrary support for application classloader
8484

85-
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.
85+
The 25.0.0.10-beta release introduces a new type of library reference for configuring an applications `<classloader/>`: the override library reference. The override library reference is similar to a private library reference because class instances remain unique to the applications classloader. The key difference is the search order. With an override library reference, the library class path is searched before the application’s own class path, which allows the library path to override classes that are already included in the application.
8686

87-
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:
87+
For example, suppose a `<webApplication/>` contains a class such as `org.acme.needs.fix.SomeImpl` that must be overridden to resolve an issue. If rebuilding the application to include the fix is difficult or undesirable, you can instead build a new library JAR (for example, someImplFix.jar) with the corrected class files. The following `server.xml` configuration shows how to use an `overrideLibraryRef` to apply the fix without rebuilding the application:
8888

8989
[source, xml]
9090
----
@@ -107,11 +107,10 @@ For example, when a `<webApplication/>` contains a class like `org.acme.needs.fi
107107
[#beta_support_java25]
108108
== Beta support for Java 25
109109

110-
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.
110+
Java 25, the latest Long-Term Support (LTS) release, contains many new features and enhancements over previous versions of Java.
111+
There are 18 new features (JEPs) in link:https://openjdk.org/projects/jdk/25/[Java 25]: 6 are test features and 12 are fully delivered.
111112

112-
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:
113-
114-
Test features:
113+
**Test features**
115114

116115
* 470: link:https://openjdk.org/jeps/470[PEM Encodings of Cryptographic Objects (Preview)]
117116
* 502: link:https://openjdk.org/jeps/502[Stable Values (Preview)]
@@ -120,7 +119,7 @@ Test features:
120119
* 508: link:https://openjdk.org/jeps/508[Vector API (Tenth Incubator)]
121120
* 509: link:https://openjdk.org/jeps/509[JFR CPU-Time Profiling (Experimental)]
122121

123-
Delivered features:
122+
**Delivered features**
124123

125124
* 503: link:https://openjdk.org/jeps/503[Remove the 32-bit x86 Port]
126125
* 506: link:https://openjdk.org/jeps/506[Scoped Values]
@@ -135,15 +134,17 @@ Delivered features:
135134
* 520: link:https://openjdk.org/jeps/520[JFR Method Timing & Tracing]
136135
* 521: link:https://openjdk.org/jeps/521[Generational Shenandoah]
137136

138-
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.
137+
When you use the `CompletableFuture` and `SubmissionPublisher` classes in Java 25 without an explicit Executor backing these classes, they default to using `ForkJoinPool.commonPool`. This pool sets its parallelism value to the number of available processors minus one (# available processors - 1). If the application runs on a system with two or fewer processors, there is a possibility of running into concurrency issues as Java 25 uses only a single thread by default. In earlier Java versions, this was not a problem because the JDK overlooked the parallelism value and created an additional thread.
139138

140-
The above issue can be avoided by following the below steps:
139+
You can avoid this issue by using one of the following approaches:
141140

142-
. 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]).
141+
. Use the `CompletableFuture` provided in Libertys Jakarta Concurrency implementation, which does not have this limitation. An easy way to do this is with a link:https://www.ibm.com/docs/en/was-liberty/core?topic=manually-configuring-managed-executors[DefaultManagedExecutorService] and the link:https://jakarta.ee/specifications/concurrency/3.1/apidocs/jakarta.concurrency/jakarta/enterprise/concurrent/managedexecutorservice#supplyAsync(java.util.function.Supplier)[supplyAsync or runAsync] methods.
143142
. 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)
144-
. Use an explicit backing Executor
143+
. Explicitly set the `ForkJoinPool.commonPool` parallelism value to the desired number of threads by using the system property,
144+
`-Djava.util.concurrent.ForkJoinPool.common.parallelism=N` (where N is the minimum number of threads required).
145+
. Use an explicit backing `Executor`.
145146

146-
For more information about this change, please reference the following links:
147+
For more information on this change, see the following links:
147148
https://bugs.openjdk.org/browse/JDK-8362881
148149
https://bugs.openjdk.org/browse/JDK-8319447
149150
https://bugs.openjdk.org/browse/JDK-8360593
@@ -152,8 +153,8 @@ Take advantage of the changes in Java 25 in Open Liberty now and get more time t
152153

153154
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!
154155

155-
For more information on Java 25, please visit the Java 25 link:https://jdk.java.net/25/release-notes[release notes page], link:https://download.java.net/java/early_access/jdk25/docs/api/[API Javadoc page] or link:https://jdk.java.net/25/[download page].
156-
For more information on Open Liberty, please visit our link:https://openliberty.io/docs[documentation page].
156+
For more information on Java 25, see the Java 25 link:https://jdk.java.net/25/release-notes[release notes page], link:https://download.java.net/java/early_access/jdk25/docs/api/[API Javadoc page] or link:https://jdk.java.net/25/[download page].
157+
For more information on Open Liberty,see our link:https://openliberty.io/docs[documentation page].
157158

158159

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

0 commit comments

Comments
 (0)