diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 1ab569c..3d66899 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -12,9 +12,9 @@ jobs: canSkip: ${{ steps.Checker.outputs.canSkip }} steps: - name: Get files - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Get tools - uses: actions/checkout@v2 + uses: actions/checkout@v4 with: path: tools/ repository: openliberty/guides-common @@ -47,10 +47,11 @@ jobs: run: working-directory: finish steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Set up JDK 17 - uses: actions/setup-java@v1 + uses: actions/setup-java@v4 with: + distribution: 'semeru' java-version: 17 - run: unset _JAVA_OPTIONS - name: Run tests diff --git a/README.adoc b/README.adoc index 37699a1..9b1ed77 100644 --- a/README.adoc +++ b/README.adoc @@ -1,4 +1,4 @@ -// Copyright (c) 2022, 2024 IBM Corporation and others. +// Copyright (c) 2022, 2025 IBM Corporation and others. // Licensed under Creative Commons Attribution-NoDerivatives // 4.0 International (CC BY-ND 4.0) // https://creativecommons.org/licenses/by-nd/4.0/ @@ -40,7 +40,7 @@ The application that you will build in this guide consists of the `client` servi image::architecture.png[Application architecture where system and client services use the Jakarta Websocket API to connect and communicate.,align="center"] -You'll learn how to use the link:https://openliberty.io/docs/latest/reference/javadoc/liberty-jakartaee9.1-javadoc.html?package=jakarta/websocket/package-frame.html&class=overview-summary.html[Jakarta WebSocket API^] to build the `system` service and the scheduler in the `client` service. The scheduler pushes messages to the system service every 10 seconds, then the system service broadcasts the messages to any connected clients. You will also learn how to use a JavaScript `WebSocket` object in an HTML file to build a WebSocket connection, subscribe to different events, and display the broadcasting messages from the `system` service in a table. +You'll learn how to use the link:https://openliberty.io/docs/latest/reference/javadoc/liberty-jakartaee10-javadoc.html?path=liberty-jakartaee10-javadoc/jakarta/websocket/package-summary.html[Jakarta WebSocket API^] to build the `system` service and the scheduler in the `client` service. The scheduler pushes messages to the system service every 10 seconds, then the system service broadcasts the messages to any connected clients. You will also learn how to use a JavaScript `WebSocket` object in an HTML file to build a WebSocket connection, subscribe to different events, and display the broadcasting messages from the `system` service in a table. // ================================================================================================= // Getting started @@ -229,7 +229,7 @@ SystemLoadScheduler.java include::finish/client/src/main/java/io/openliberty/guides/client/scheduler/SystemLoadScheduler.java[] ---- -The `SystemLoadScheduler` class uses the [hotspot=systemClient file=1]`SystemClient` class to establish a connection to the server by the `ws://localhost:9081/systemLoad` URI at the [hotspot=postConstruct file=1]`@PostConstruct` annotated method. The [hotspot=sendSystemLoad file=1]`sendSystemLoad()` method calls the client to send a random string from either [hotspot=messages file=1]`cpuLoad`, [hotspot=messages file=1]`memoryUsage`, or [hotspot=messages file=1]`both` to the `system` service. Using the link:https://openliberty.io/docs/latest/reference/javadoc/liberty-jakartaee9.1-javadoc.html?package=jakarta/ejb/package-frame.html&class=jakarta/ejb/TimerService.html[Jakarta Enterprise Beans Timer Service^], annotate the `sendSystemLoad()` method with the [hotspot=schedule file=1]`@Schedule` annotation so that it sends out a message every 10 seconds. +The `SystemLoadScheduler` class uses the [hotspot=systemClient file=1]`SystemClient` class to establish a connection to the server by the `ws://localhost:9081/systemLoad` URI at the [hotspot=postConstruct file=1]`@PostConstruct` annotated method. The [hotspot=sendSystemLoad file=1]`sendSystemLoad()` method calls the client to send a random string from either [hotspot=messages file=1]`cpuLoad`, [hotspot=messages file=1]`memoryUsage`, or [hotspot=messages file=1]`both` to the `system` service. Using the link:https://openliberty.io/docs/latest/reference/javadoc/liberty-jakartaee10-javadoc.html?path=liberty-jakartaee10-javadoc/jakarta/ejb/Schedule.html[Jakarta Enterprise Beans Schedule^], annotate the `sendSystemLoad()` method with the [hotspot=schedule file=1]`@Schedule` annotation so that it sends out a message every 10 seconds. Now, create the front-end UI. The images and styles for the UI are provided for you. diff --git a/finish/client/src/main/liberty/config/server.xml b/finish/client/src/main/liberty/config/server.xml index 600f092..0371149 100755 --- a/finish/client/src/main/liberty/config/server.xml +++ b/finish/client/src/main/liberty/config/server.xml @@ -1,10 +1,11 @@ + jakartaee-10.0 - restfulWS-3.1 - websocket-2.1 - enterpriseBeansLite-4.0 + restfulWS + websocket + enterpriseBeansLite diff --git a/finish/system/src/main/liberty/config/server.xml b/finish/system/src/main/liberty/config/server.xml index 38d5934..0dfaacc 100755 --- a/finish/system/src/main/liberty/config/server.xml +++ b/finish/system/src/main/liberty/config/server.xml @@ -1,11 +1,12 @@ + jakartaee-10.0 - websocket-2.1 + websocket - jsonb-3.0 + jsonb diff --git a/start/client/src/main/liberty/config/server.xml b/start/client/src/main/liberty/config/server.xml index 600f092..0371149 100755 --- a/start/client/src/main/liberty/config/server.xml +++ b/start/client/src/main/liberty/config/server.xml @@ -1,10 +1,11 @@ + jakartaee-10.0 - restfulWS-3.1 - websocket-2.1 - enterpriseBeansLite-4.0 + restfulWS + websocket + enterpriseBeansLite diff --git a/start/system/src/main/liberty/config/server.xml b/start/system/src/main/liberty/config/server.xml index 38d5934..0dfaacc 100755 --- a/start/system/src/main/liberty/config/server.xml +++ b/start/system/src/main/liberty/config/server.xml @@ -1,11 +1,12 @@ + jakartaee-10.0 - websocket-2.1 + websocket - jsonb-3.0 + jsonb