Skip to content
Draft
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
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile-db2
Original file line number Diff line number Diff line change
@@ -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
Expand Down
9 changes: 7 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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
Expand Down
6 changes: 6 additions & 0 deletions README_LOAD_TEST.md
Original file line number Diff line number Diff line change
@@ -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 <OPENLIBERTY_HOME>, and a default profile created)
Expand Down
55 changes: 49 additions & 6 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,17 @@
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<maven.compiler.release>25</maven.compiler.release>
<version.liberty.maven.plugin>3.12.0</version.liberty.maven.plugin>
<version.maven.compiler.plugin>3.15.0</version.maven.compiler.plugin>
<version.maven.war.plugin>3.5.1</version.maven.war.plugin>
<version.maven.resources.plugin>3.5.0</version.maven.resources.plugin>
<version.maven.dependency.plugin>3.10.0</version.maven.dependency.plugin>
<version.maven.enforcer.plugin>3.6.2</version.maven.enforcer.plugin>
<required.maven.version>3.8.6</required.maven.version>
<required.java.version>[25,26)</required.java.version>
<!-- Derby library -->
<version.derby>10.14.2.0</version.derby>
<version.derby>10.17.1.0</version.derby>
<derby.path>${user.home}/.m2/repository/org/apache/derby/derby</derby.path>
<!-- Liberty configuration -->
<testServerHttpPort>9080</testServerHttpPort>
Expand Down Expand Up @@ -51,18 +58,54 @@
<plugin>
<groupId>io.openliberty.tools</groupId>
<artifactId>liberty-maven-plugin</artifactId>
<version>3.3-M4</version>
<version>${version.liberty.maven.plugin}</version>
<configuration>
<bootstrapProperties>
<default.http.port>${testServerHttpPort}</default.http.port>
<default.https.port>${testServerHttpsPort}</default.https.port>
</bootstrapProperties>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
<version>${version.maven.enforcer.plugin}</version>
<executions>
<execution>
<id>enforce-build-toolchain</id>
<goals>
<goal>enforce</goal>
</goals>
<configuration>
<rules>
<requireMavenVersion>
<version>${required.maven.version}</version>
</requireMavenVersion>
<requireJavaVersion>
<version>${required.java.version}</version>
</requireJavaVersion>
</rules>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>${version.maven.compiler.plugin}</version>
<configuration>
<release>${maven.compiler.release}</release>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>${version.maven.war.plugin}</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>3.1.2</version>
<version>${version.maven.dependency.plugin}</version>
<executions>
<execution>
<id>copy-derby-dependency</id>
Expand All @@ -79,7 +122,7 @@
</plugin>
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<version>2.6</version>
<version>${version.maven.resources.plugin}</version>
<executions>
<execution>
<id>copy-resources</id>
Expand Down
2 changes: 1 addition & 1 deletion src/main/liberty/config/server.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<feature>ssl-1.0</feature>
</featureManager>

<variable name="derby.lib" defaultValue="${shared.resource.dir}/DerbyLibs/derby-10.14.2.0.jar" />
<variable name="derby.lib" defaultValue="${shared.resource.dir}/DerbyLibs/derby-10.17.1.0.jar" />

<keyStore id="defaultKeyStore" password="yourPassword" />

Expand Down