From df3e981669ecb1ee6819d4b8126943aea52c993d Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Mon, 23 Mar 2026 01:49:38 +0000 Subject: [PATCH] Upgrade build and runtime baseline to Java 25 Co-authored-by: Alexander Lang --- Dockerfile | 4 +-- Dockerfile-db2 | 2 +- README.md | 9 +++-- README_LOAD_TEST.md | 6 ++++ pom.xml | 55 ++++++++++++++++++++++++++---- src/main/liberty/config/server.xml | 2 +- 6 files changed, 66 insertions(+), 12 deletions(-) diff --git a/Dockerfile b/Dockerfile index bce5ad8..f8a6275 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,11 +1,11 @@ -FROM open-liberty:full +FROM icr.io/appcafe/open-liberty:full-java25-openj9-ubi-minimal COPY --chown=1001:0 src/main/liberty/config/server.xml /config/server.xml COPY --chown=1001:0 src/main/liberty/config/bootstrap.properties /config/bootstrap.properties COPY --chown=1001:0 target/io.openliberty.sample.daytrader8.war /config/apps/ #Derby -COPY --chown=1001:0 target/liberty/wlp/usr/shared/resources/DerbyLibs/derby-10.14.2.0.jar /opt/ol/wlp/usr/shared/resources/DerbyLibs/derby-10.14.2.0.jar +COPY --chown=1001:0 target/liberty/wlp/usr/shared/resources/DerbyLibs/derby-10.17.1.0.jar /opt/ol/wlp/usr/shared/resources/DerbyLibs/derby-10.17.1.0.jar COPY --chown=1001:0 target/liberty/wlp/usr/shared/resources/data /opt/ol/wlp/usr/shared/resources/data ENV MAX_USERS=1000 diff --git a/Dockerfile-db2 b/Dockerfile-db2 index c32a54e..82780e9 100644 --- a/Dockerfile-db2 +++ b/Dockerfile-db2 @@ -1,7 +1,7 @@ # Create folder db2jars/ and copy db2jcc4.jar and db2jcc_license_cu.jar to it. # Set Env below -FROM open-liberty:full +FROM icr.io/appcafe/open-liberty:full-java25-openj9-ubi-minimal COPY --chown=1001:0 src/main/liberty/config/server.xml_db2 /config/server.xml COPY --chown=1001:0 src/main/liberty/config/bootstrap.properties /config/bootstrap.properties diff --git a/README.md b/README.md index 595a96d..56938d3 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ This sample contains the DayTrader 8 benchmark, which is an application built ar DayTrader is an end-to-end benchmark and performance sample application. It provides a real world Java EE workload. DayTrader's new design spans Java EE 8. -This sample can be installed onto Liberty runtime versions 18.0.0.2 and later. A prebuilt derby database is provided in resources/data +This sample requires Java 25 and a Java 25-capable Open Liberty runtime image. A prebuilt derby database is provided in resources/data. To run this sample, first [download](https://github.com/OpenLiberty/sample.daytrader8/archive/master.zip) or clone this repo - to clone: @@ -17,7 +17,12 @@ From inside the sample.daytrader8 directory, build and start the application in mvn clean package liberty:run ``` -The server will listen on port 9080 by default. You can change the port (for example, to port 9081) by adding `mvn clean package liberty:run -DtestServerHttpPort=9081` to the end of the Maven command. +The server will listen on port 9080 by default. You can change the port (for example, to port 9081) by adding `mvn clean package liberty:run -DtestServerHttpPort=9081` to the end of the Maven command. + +### Prerequisites + +- Java Development Kit (JDK) 25 +- Apache Maven 3.8.6 or newer Once the server is started, you should be able to access the application at: http://localhost:9080/daytrader diff --git a/README_LOAD_TEST.md b/README_LOAD_TEST.md index 23d468e..e1ddee0 100644 --- a/README_LOAD_TEST.md +++ b/README_LOAD_TEST.md @@ -1,6 +1,12 @@ # Daytrader8: Load Testing This readme explains how to setup DB2 and load test the Daytrader 8 application with Open Liberty. +## Java version prerequisites + +- JDK 25 is required to build this project with Maven. +- Use an Open Liberty runtime/container image that includes Java 25. +- Ensure your DB2 JDBC driver jars are compatible with Java 25. + ## Prerequisites 1. Open Liberty Machine (Server with Open Liberty unzipped at , and a default profile created) diff --git a/pom.xml b/pom.xml index cd63184..319702f 100644 --- a/pom.xml +++ b/pom.xml @@ -8,10 +8,17 @@ UTF-8 UTF-8 - 1.8 - 1.8 + 25 + 3.12.0 + 3.15.0 + 3.5.1 + 3.5.0 + 3.10.0 + 3.6.2 + 3.8.6 + [25,26) - 10.14.2.0 + 10.17.1.0 ${user.home}/.m2/repository/org/apache/derby/derby 9080 @@ -51,7 +58,7 @@ io.openliberty.tools liberty-maven-plugin - 3.3-M4 + ${version.liberty.maven.plugin} ${testServerHttpPort} @@ -59,10 +66,46 @@ + + org.apache.maven.plugins + maven-enforcer-plugin + ${version.maven.enforcer.plugin} + + + enforce-build-toolchain + + enforce + + + + + ${required.maven.version} + + + ${required.java.version} + + + + + + + + org.apache.maven.plugins + maven-compiler-plugin + ${version.maven.compiler.plugin} + + ${maven.compiler.release} + + + + org.apache.maven.plugins + maven-war-plugin + ${version.maven.war.plugin} + org.apache.maven.plugins maven-dependency-plugin - 3.1.2 + ${version.maven.dependency.plugin} copy-derby-dependency @@ -79,7 +122,7 @@ maven-resources-plugin - 2.6 + ${version.maven.resources.plugin} copy-resources diff --git a/src/main/liberty/config/server.xml b/src/main/liberty/config/server.xml index c951cac..0276f55 100644 --- a/src/main/liberty/config/server.xml +++ b/src/main/liberty/config/server.xml @@ -18,7 +18,7 @@ ssl-1.0 - +