Note
|
This repository contains the guide documentation source. To view the guide in published form, view it on the Open Liberty website. |
Learn how to run tasks asynchronously or parallelly in Java microservices by using Jakarta Concurrency APIs.
Introduction
-
explain Jakarta Concurrency APIs
-
describe the application
Polish the following instruction.
Navigate to the finish directory.
cd finish
Start inventory
service in dev mode:
mvn -pl inventory liberty:run
Start system
service in dev mode:
mvn -pl system liberty:run
Visit http://localhost:9080/openapi/ui for inventory REST APIs that perform asynchronous or parallel tasks
-
start the dev mode
-
create the InventoryAsyncTask utility class
-
create and explain asynchronous task
-
replace the InventoryResource class
-
add/update REST endpoint to call asynchronous task
-
start the dev mode
-
replace the InventoryAsyncTask utility class
-
create and explain parallel task
-
replace the InventoryResource class
-
add/update REST endpoint to call parallel task
-
similar to https://openliberty.io/guides/cdi-intro.html#testing-the-inventory-application
-
explain the test
-
similar to https://openliberty.io/guides/cdi-intro.html#running-the-tests
-
stop the dev mode of the system and inventory services
You have just … by using Jakarta Concurrency APIs in Open Liberty.