From 5e723b8c8a3a0aa9b0b3ba049d031b2610d19838 Mon Sep 17 00:00:00 2001 From: IsmathBadsha Date: Mon, 15 Sep 2025 08:24:18 +0000 Subject: [PATCH 1/2] 25.0.0.10-beta --- posts/2025-09-23-25.0.0.10-beta.adoc | 260 +++++++++++++++++++++++++++ 1 file changed, 260 insertions(+) create mode 100644 posts/2025-09-23-25.0.0.10-beta.adoc diff --git a/posts/2025-09-23-25.0.0.10-beta.adoc b/posts/2025-09-23-25.0.0.10-beta.adoc new file mode 100644 index 000000000..c14125941 --- /dev/null +++ b/posts/2025-09-23-25.0.0.10-beta.adoc @@ -0,0 +1,260 @@ +--- +layout: post +title: "TITLE" +# Do NOT change the categories section +categories: blog +author_picture: https://avatars3.githubusercontent.com/IsmathBadsha +author_github: https://github.com/IsmathBadsha +seo-title: TITLE - makes sure it ends with - OpenLiberty.io +seo-description: DESCRIPTION +blog_description: DESCRIPTION +open-graph-image: https://openliberty.io/img/twitter_card.jpg +open-graph-image-alt: Open Liberty Logo +--- += TITLE +Ismath Badsha +:imagesdir: / +:url-prefix: +:url-about: / +//Blank line here is necessary before starting the body of the post. + +// // // // // // // // +// In the preceding section: +// Do not insert any blank lines between any of the lines. +// Do not remove or edit the variables on the lines beneath the author name. +// +// "open-graph-image" is set to OL logo. Whenever possible update this to a more appropriate/specific image (For example if present an image that is being used in the post). However, it +// can be left empty which will set it to the default +// +// "open-graph-image-alt" is a description of what is in the image (not a caption). When changing "open-graph-image" to +// a custom picture, you must provide a custom string for "open-graph-image-alt". +// +// Replace TITLE with the blog post title eg: MicroProfile 3.3 is now available on Open Liberty 20.0.0.4 +// Replace IsmathBadsha with your GitHub username eg: lauracowen +// Replace DESCRIPTION with a short summary (~60 words) of the release (a more succinct version of the first paragraph of the post). +// Replace Ismath Badsha with your name as you'd like it to be displayed, +// eg: LauraCowen +// +// For every link starting with "https://openliberty.io" in the post make sure to use +// {url-prefix}. e.g- link:{url-prefix}/guides/GUIDENAME[GUIDENAME]: +// +// If adding image into the post add : +// ------------------------- +// [.img_border_light] +// image::img/blog/FILE_NAME[IMAGE CAPTION ,width=70%,align="center"] +// ------------------------- +// "[.img_border_light]" = This adds a faint grey border around the image to make its edges sharper. Use it around screenshots but not +// around diagrams. Then double check how it looks. +// There is also a "[.img_border_dark]" class which tends to work best with screenshots that are taken on dark backgrounds. +// Change "FILE_NAME" to the name of the image file. Also make sure to put the image into the right folder which is: img/blog +// change the "IMAGE CAPTION" to a couple words of what the image is +// // // // // // // // + +BETA_RELEASE_SUMMARY + +// // // // // // // // +// Change the RELEASE_SUMMARY to an introductory paragraph. This sentence is really +// important because it is supposed to grab the readers attention. Make sure to keep the blank lines +// +// Throughout the doc, replace 25.0.0.10-beta with the version number of Open Liberty, eg: 22.0.0.2-beta +// // // // // // // // + +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]): + +* <> +* <> + +// // // // // // // // +// In the preceding section: +// Change SUB_FEATURE_TITLE to the feature that is included in this release and +// change the SUB_TAG_1/2/3 to the heading tags +// +// However if there's only 1 new feature, delete the previous section and change it to the following sentence: +// "The link:{url-about}[Open Liberty] 25.0.0.10-beta includes SUB_FEATURE_TITLE" +// // // // // // // // + +See also link:{url-prefix}/blog/?search=beta&key=tag[previous Open Liberty beta blog posts]. + +// // // // DO NOT MODIFY THIS COMMENT BLOCK // // // // +// Blog issue: https://github.com/OpenLiberty/open-liberty/issues/32778 +// Contact/Reviewer: tjwatson +// // // // // // // // +[#SUB_TAG_0] +== overrideLibrary support for application classloader + + +For the 25.0.0.10-beta, a new library reference type is available for an application's `` configuration that is used to configure an override library. Similar to private library references, class insteances are unique to the application's classloader, independent of class instances from other classloaders. The referenced override library class path is searched before searching the application classloader's own class path. This allows a library path to override classes contained in an application. + +For example, if there is an `` that contains a class `org.acme.needs.fix.SomeImpl` that needs to be overridden in order to fix an issue, but it is difficult or undesirable to rebuild the application to pull in the fix a new library JAR (e.g. someImplFix.jar) could be built to include the class files that need to be fixed. Then the following `server.xml` could be used to configure an `overrideLibraryRef` to fix the application without requiring the application to be rebuilt: + +```xml + + + + + + + +``` + + +// DO NOT MODIFY THIS LINE. + +// // // // DO NOT MODIFY THIS COMMENT BLOCK // // // // +// Blog issue: https://github.com/OpenLiberty/open-liberty/issues/32681 +// Contact/Reviewer: gjwatts +// // // // // // // // +[#SUB_TAG_1] +== Beta support for Java 25 + +Please provide a summary of the update, including the following points: + +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. + +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: + +Test features: +470: link:https://openjdk.org/jeps/470[PEM Encodings of Cryptographic Objects (Preview)] +502: link:https://openjdk.org/jeps/502[Stable Values (Preview)] +505: link:https://openjdk.org/jeps/505[Structured Concurrency (Fifth Preview)] +507: link:https://openjdk.org/jeps/507[Primitive Types in Patterns, instanceof, and switch (Third Preview)] +508: link:https://openjdk.org/jeps/508[Vector API (Tenth Incubator)] +509: link:https://openjdk.org/jeps/509[JFR CPU-Time Profiling (Experimental)] + +Delivered features: +503: link:https://openjdk.org/jeps/503[Remove the 32-bit x86 Port] +506: link:https://openjdk.org/jeps/506[Scoped Values] +510: link:https://openjdk.org/jeps/510[Key Derivation Function API] +511: link:https://openjdk.org/jeps/511[Module Import Declarations] +512: link:https://openjdk.org/jeps/512[Compact Source Files and Instance Main Methods] +513: link:https://openjdk.org/jeps/513[Flexible Constructor Bodies] +514: link:https://openjdk.org/jeps/514[Ahead-of-Time Command-Line Ergonomics] +515: link:https://openjdk.org/jeps/515[Ahead-of-Time Method Profiling] +518: link:https://openjdk.org/jeps/518[JFR Cooperative Sampling] +519: link:https://openjdk.org/jeps/519[Compact Object Headers] +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`. That 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 + +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. + +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! + +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]. +For more information on Open Liberty, please visit our link:https://openliberty.io/docs[documentation page]. + + +// DO NOT MODIFY THIS LINE. + + + +To enable the new beta features in your app, add them to your `server.xml`: + +[source, xml] +---- + +---- + +[#run] +=== Try it now + +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 21, Java SE 17, Java SE 11, and Java SE 8. +// // // // // // // // +// In the preceding section: +// Check if a new non-LTS Java SE version is supported that needs to be added to the list (21, 17, 11, and 8 are LTS and will remain for a while) +// https://openliberty.io/docs/latest/java-se.html +// +// In the following section: +// Check if a new MicroProfile or Jakarta version is in beta that could replace the example values in the codeblock +// // // // // // // // + +If you're using link:{url-prefix}/guides/maven-intro.html[Maven], you can install the All Beta Features package using: + +[source,xml] +---- + + io.openliberty.tools + liberty-maven-plugin + 3.8.2 + + + io.openliberty.beta + openliberty-runtime + 25.0.0.10-beta + zip + + + +---- + +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: + +[source,xml] +---- + + org.example.spec + exampleApi + 7.0 + pom + provided + + + example.platform + example.example-api + 11.0.0 + provided + +---- + +Or for link:{url-prefix}/guides/gradle-intro.html[Gradle]: + +[source,gradle] +---- +buildscript { + repositories { + mavenCentral() + } + dependencies { + classpath 'io.openliberty.tools:liberty-gradle-plugin:3.6.2' + } +} +apply plugin: 'liberty' +dependencies { + libertyRuntime group: 'io.openliberty.beta', name: 'openliberty-runtime', version: '[25.0.0.10-beta,)' +} +---- +// // // // // // // // +// In the preceding section: +// Replace the Maven `3.8.2` with the latest version of the plugin: https://search.maven.org/artifact/io.openliberty.tools/liberty-maven-plugin +// Replace the Gradle `3.6.2` with the latest version of the plugin: https://search.maven.org/artifact/io.openliberty.tools/liberty-gradle-plugin +// TODO: Update GHA to automatically do the above. If the maven.org is problematic, then could fallback to using the GH Releases for the plugins +// // // // // // // // + +Or if you're using link:{url-prefix}/docs/latest/container-images.html[container images]: + +[source] +---- +FROM icr.io/appcafe/open-liberty:beta +---- + +Or take a look at our link:{url-prefix}/downloads/#runtime_betas[Downloads page]. + +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:https://openliberty.io/docs/latest/develop-liberty-tools.html[Liberty developer tools] to enable effective development, testing, debugging and application management all from within your IDE. + +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. + +[#feedback] +== We welcome your feedback + +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]. From 91b5ccff5b99fd68dc57dd457bdf7a2f44378c64 Mon Sep 17 00:00:00 2001 From: IsmathBadsha Date: Wed, 17 Sep 2025 21:09:29 +0530 Subject: [PATCH 2/2] 25.0.0.10_beta --- posts/2025-09-23-25.0.0.10-beta.adoc | 78 ++++++++++++++-------------- 1 file changed, 39 insertions(+), 39 deletions(-) diff --git a/posts/2025-09-23-25.0.0.10-beta.adoc b/posts/2025-09-23-25.0.0.10-beta.adoc index c14125941..61f73e09b 100644 --- a/posts/2025-09-23-25.0.0.10-beta.adoc +++ b/posts/2025-09-23-25.0.0.10-beta.adoc @@ -1,17 +1,17 @@ --- layout: post -title: "TITLE" +title: "Support for override library in the application classloader and support for Java 25 in 25.0.0.10-beta" # Do NOT change the categories section categories: blog author_picture: https://avatars3.githubusercontent.com/IsmathBadsha author_github: https://github.com/IsmathBadsha -seo-title: TITLE - makes sure it ends with - OpenLiberty.io -seo-description: DESCRIPTION -blog_description: DESCRIPTION +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. open-graph-image: https://openliberty.io/img/twitter_card.jpg open-graph-image-alt: Open Liberty Logo --- -= TITLE += Support for override library in the application classloader and support for Java 25 in 25.0.0.10-beta Ismath Badsha :imagesdir: / :url-prefix: @@ -50,7 +50,7 @@ Ismath Badsha // change the "IMAGE CAPTION" to a couple words of what the image is // // // // // // // // -BETA_RELEASE_SUMMARY +Support for override libraries in the application classloader and Java 25 compatibility are introduced in 25.0.0.10-beta. // // // // // // // // // Change the RELEASE_SUMMARY to an introductory paragraph. This sentence is really @@ -61,8 +61,8 @@ BETA_RELEASE_SUMMARY 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]): -* <> -* <> +* <> +* <> // // // // // // // // // In the preceding section: @@ -79,15 +79,15 @@ See also link:{url-prefix}/blog/?search=beta&key=tag[previous Open Liberty beta // Blog issue: https://github.com/OpenLiberty/open-liberty/issues/32778 // Contact/Reviewer: tjwatson // // // // // // // // -[#SUB_TAG_0] +[#overrideLibrary] == overrideLibrary support for application classloader - -For the 25.0.0.10-beta, a new library reference type is available for an application's `` configuration that is used to configure an override library. Similar to private library references, class insteances are unique to the application's classloader, independent of class instances from other classloaders. The referenced override library class path is searched before searching the application classloader's own class path. This allows a library path to override classes contained in an application. +The 25.0.0.10-beta release introduces a new type of library reference for configuring an application's . 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, if there is an `` that contains a class `org.acme.needs.fix.SomeImpl` that needs to be overridden in order to fix an issue, but it is difficult or undesirable to rebuild the application to pull in the fix a new library JAR (e.g. someImplFix.jar) could be built to include the class files that need to be fixed. Then the following `server.xml` could be used to configure an `overrideLibraryRef` to fix the application without requiring the application to be rebuilt: +For example, when a `` 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: -```xml +[source, xml] +---- @@ -95,7 +95,7 @@ For example, if there is an `` that contains a class `org.acme. -``` +---- // DO NOT MODIFY THIS LINE. @@ -104,38 +104,38 @@ For example, if there is an `` that contains a class `org.acme. // Blog issue: https://github.com/OpenLiberty/open-liberty/issues/32681 // Contact/Reviewer: gjwatts // // // // // // // // -[#SUB_TAG_1] +[#beta_support_java25] == Beta support for Java 25 -Please provide a summary of the update, including the following points: - 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. 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: Test features: -470: link:https://openjdk.org/jeps/470[PEM Encodings of Cryptographic Objects (Preview)] -502: link:https://openjdk.org/jeps/502[Stable Values (Preview)] -505: link:https://openjdk.org/jeps/505[Structured Concurrency (Fifth Preview)] -507: link:https://openjdk.org/jeps/507[Primitive Types in Patterns, instanceof, and switch (Third Preview)] -508: link:https://openjdk.org/jeps/508[Vector API (Tenth Incubator)] -509: link:https://openjdk.org/jeps/509[JFR CPU-Time Profiling (Experimental)] + +* 470: link:https://openjdk.org/jeps/470[PEM Encodings of Cryptographic Objects (Preview)] +* 502: link:https://openjdk.org/jeps/502[Stable Values (Preview)] +* 505: link:https://openjdk.org/jeps/505[Structured Concurrency (Fifth Preview)] +* 507: link:https://openjdk.org/jeps/507[Primitive Types in Patterns, instanceof, and switch (Third Preview)] +* 508: link:https://openjdk.org/jeps/508[Vector API (Tenth Incubator)] +* 509: link:https://openjdk.org/jeps/509[JFR CPU-Time Profiling (Experimental)] Delivered features: -503: link:https://openjdk.org/jeps/503[Remove the 32-bit x86 Port] -506: link:https://openjdk.org/jeps/506[Scoped Values] -510: link:https://openjdk.org/jeps/510[Key Derivation Function API] -511: link:https://openjdk.org/jeps/511[Module Import Declarations] -512: link:https://openjdk.org/jeps/512[Compact Source Files and Instance Main Methods] -513: link:https://openjdk.org/jeps/513[Flexible Constructor Bodies] -514: link:https://openjdk.org/jeps/514[Ahead-of-Time Command-Line Ergonomics] -515: link:https://openjdk.org/jeps/515[Ahead-of-Time Method Profiling] -518: link:https://openjdk.org/jeps/518[JFR Cooperative Sampling] -519: link:https://openjdk.org/jeps/519[Compact Object Headers] -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`. That 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. + +* 503: link:https://openjdk.org/jeps/503[Remove the 32-bit x86 Port] +* 506: link:https://openjdk.org/jeps/506[Scoped Values] +* 510: link:https://openjdk.org/jeps/510[Key Derivation Function API] +* 511: link:https://openjdk.org/jeps/511[Module Import Declarations] +* 512: link:https://openjdk.org/jeps/512[Compact Source Files and Instance Main Methods] +* 513: link:https://openjdk.org/jeps/513[Flexible Constructor Bodies] +* 514: link:https://openjdk.org/jeps/514[Ahead-of-Time Command-Line Ergonomics] +* 515: link:https://openjdk.org/jeps/515[Ahead-of-Time Method Profiling] +* 518: link:https://openjdk.org/jeps/518[JFR Cooperative Sampling] +* 519: link:https://openjdk.org/jeps/519[Compact Object Headers] +* 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) @@ -186,7 +186,7 @@ If you're using link:{url-prefix}/guides/maven-intro.html[Maven], you can instal io.openliberty.tools liberty-maven-plugin - 3.8.2 + 3.11.5 io.openliberty.beta @@ -226,7 +226,7 @@ buildscript { mavenCentral() } dependencies { - classpath 'io.openliberty.tools:liberty-gradle-plugin:3.6.2' + classpath 'io.openliberty.tools:liberty-gradle-plugin:3.9.5' } } apply plugin: 'liberty'