An implementation of the MicroProfile LRA specification. MicroProfile LRA provides an annotation-based API that enables loosely coupled services to coordinate long running activities in such a way as to guarantee a globally consistent outcome without the need to take long duration locks on data.
-
JDK 17 or later
-
Maven (version 3.9.x recommended or use the included Maven Wrapper ./mvnw)
Use the Maven Wrapper to build:
./mvnw clean installAlternatively, use the build.sh script which configures sensible defaults:
./build.sh clean installTo skip tests during the build:
./mvnw clean install -DskipTestsTo apply code formatting (enabled by default via the format profile):
./mvnw clean package -DskipTests| Module | Description |
|---|---|
|
Shared functionality common to both the coordinator and clients |
|
LRA client library for communicating with the coordinator |
|
Core LRA coordinator implementation — manages long running action lifecycle, state, and recovery |
|
WAR packaging of the coordinator for deployment on application servers |
|
JAX-RS integration including filters, context providers, and request/response handling |
|
Proxy API module for LRA proxy functionality |
|
Arquillian test framework extension for deploying and testing LRA in managed containers |
|
Integration tests — see test/README.adoc for details |
Integration tests use the Maven Failsafe Plugin and Arquillian to spin up separate JVMs for the coordinator, participant, and test client.
To run all integration tests with a provisioned WildFly instance:
mvn clean verify -Parq,provisionTo run a single test:
mvn clean verify -Parq,provision -pl :lra-test-basic -Dit.test=FailedLRAITTo run against an existing WildFly installation:
export JBOSS_HOME=/path/to/wildfly
mvn clean verify -ParqFor more details on test configuration, profiles, and debugging options, see test/README.adoc.
The LRA coordinator implements MicroProfile Fault Tolerance strategies:
-
Bulkhead: Limits concurrent execution so that failures in one area cannot overload the whole system.
Fault tolerance variables (Bulkhead value and waitingTaskQueue) can be configured using the classname/annotation/parameter format in the microprofile-config.properties file.
See the Eclipse Fault Tolerance documentation for details.
The coordinator exposes a REST API. For details on API versioning, version negotiation via the Narayana-LRA-API-version header, and how to generate the OpenAPI schema, see API.adoc.
To generate the OpenAPI schema:
cd coordinator
mvn process-classes -Popenapi-schema| Profile | Description |
|---|---|
|
Runs integration tests using Arquillian with WildFly |
|
Provisions a WildFly Galleon instance for testing |
|
Downloads a WildFly zip distribution for testing |
|
Tests against the WildFly built-in LRA coordinator subsystem |
|
Enables documentation, source, and javadoc packaging |
|
Enables JaCoCo code coverage reporting |
|
Enables JVM debugging on port 8787 |
|
Runs SpotBugs static analysis |
|
Generates the OpenAPI schema for the coordinator REST API |
Additional documentation is available in the docs/ directory. To generate the HTML documentation:
cd docs
mvn clean generate-resources
# Output: docs/target/html/This project is licensed under the Apache License 2.0.