This repository holds the sample application for the talk Microservice with Thorntail at GranitTreff on 22.04.2020. Actually this repository illustrates how a JEE application can run on multiple runtimes such as Quakrus, Thorntail and Wildfly.
-
./pom.xml
Thepom.xml
we develop with resulting in an WAR Archive -
./pom-quarkus.xml
The Quarkuspom.xml
for building the Quarkus microservice -
./pom-thorntail.xml
The Thorntailpom.xml
for building the Throntail microservice -
./pom-wildfly.xml
The Wildflypom.xml
for building the 'Wildfly microservice'
-
./thorntail-external.yaml
The external Throtnail configuration file -
./wildfly.properties
The external Wildfly configuration file
-
./target
The plain war. -
./target-quarkus
The Quakrus microservice target directory. -
./target-thorntail
The Thorntail microservice target directory. -
./target-wildfly
The Wildfly microservice target directory. -
./src/main/resources
The resource directory containing resources used by all microservice types. -
./src/main/resources-quarkus
The resource directory containing resources used by Quarkus microservice only. -
./src/main/resources-thorntail
The resource directory containing resources used by Thorntail microservice only. -
./src/main/webapp-wildfly
The web resource directory containing resources used by Wildfly microservice only.
./mvnw[.cmd] clean install -f pom.xml
./mvnw[.cmd] clean install -f pom-thorntail.xml
./mvnw[.cmd] clean install -f pom-quarkus.xml
./mvnw[.cmd] clean install -f pom-wildfly.xml
./mvnw[.cmd] thorntail:run -f pom-thorntail.xml
java "-Djava.net.preferIPv4Stack=true" "-Dquarkus.http.port=8082" -jar target-thorntail\microprofile-thorntail-0.0.1-SNAPSHOT-thorntail.jar
./mvnw[.cmd] quarkus:dev -f pom-quarkus.xml
java "-Djava.net.preferIPv4Stack=true" "-Dquarkus.http.port=8082" -jar target-quarkus\microprofile-quarkus-0.0.1-SNAPSHOT-runner.jar
Tip
|
Normally the maven goal quarkus:dev should start the application as well but it fails with ClassNotFoundException (org/jboss/logging/Logger).I think this is related to working on a Windows OS. |
./mvnw[.cmd] wildfly:run -f pom-wildfly.xml
This sample application requires a Jaeger instance running on localhost:6831
where the traces are being send to.
docker run -p 6831:6831/udp -p 16686:16686 --name jaeger-local jaegertracing/all-in-one:latest
If you use Intellij then you can use the test.http
file for testing the rest endpoints.
However, see the following available endpoints and use the tool of your choice.
The different microservice types run on different ports, so that they can be started concurrently.
-
Wildfly -
8080
-
Thorntail -
8081
-
Quarkus -
8080
GET 8080|8081|8082/get
POST 8080|8081|8082/post
PATCH 8080|8081|8082/patch
DELETE 8080|8081|8082/delete
GET 8080|8081|8082/custom/get
POST 8080|8081|8082/custom/post
PATCH 8080|8081|8082/custom/patch
DELETE 8080|8081|8082/custom/delete