Building Apps with Helidon & MicroProfile

Implementing a MicroProfile application with JAX-RS, CDI, Metrics, Health, Fault Tolerance, Config from "Scratch" and on Helidon:

Micronaut, MicroProfile, Micronaut Data and Helidon

A code-driven introduction to Micronaut, Micronaut support for MicroProfile, and using Micronaut data with Helidon:

From Competitive Gaming to Java EE API Mavenization--an podcast

Subscribe to podcast via: spotify| iTunes| RSS

The #128 episode with Romain Grecourt (@@rgrecourt) about:
competitive gaming, Java, Glassfish, Maven and Java EE API packaging
is available for

How KumuluzEE Happened--an podcast

Subscribe to podcast via: spotify| iTunes| RSS

The #127 episode with Jan Meznarič (jmezna) about:
"Java microservices, drools, jbpm, GlassFish, MicroProfile, Java EE, FatJARs, exploded JARs and layered JARs, cloud native apps, metrics, configuration, blockchain, peer to peer service updates and how KumuluzEE happened"
is available for

2021: Familiar APIs on Kickass Runtimes--WeAreDevelopers Conference Session

"Java's JAX-RS, DI, JPA, Metrics, Fault Tolerance, Configuration, cloud-readiness combined with minimal start times, high performance, and Go-like feel. ...and this without a dependency on a particular framework, vendor, or library. In this session, I will implement a next-generation Java backend from scratch and explain the magic on-the-fly. Java SE, reactive APIs, Helidon, Quarkus, GraalVM, MicroProfile, and a bit of Jakarta EE included."

Micronaut with JAX-RS, Dependency Injection (JSR-330)--a touch of MicroProfile supports JAX-RS, Bean Validation and JSR 330: Dependency Injection for Java compatible Dependency Injection and so a MicroProfile subset:

Quarkus, Health, Metrics,OpenAPI: Moved Permanently (301)

Quarkus release 1.11.0 (January 20, 2021) introduced the Dev UI /q/dev. To avoid conflicts, all non-application endpoints (e.g. /health, /metrics) were moved to the new root /q.

Now, the health endpoint is available under: /q/health and metrics are available under /q/metrics

Quarkus automatically redirects the non-application endpoints to the new location:

> curl -i localhost:8080/health
HTTP/1.1 301 Moved Permanently
location: http://localhost:8080/q/health    

> curl -i localhost:8080/metrics
HTTP/1.1 301 Moved Permanently
location: http://localhost:8080/q/metrics    

I'm using MicroProfile metrics after torture tests for threshold verification. The release +1.11.* broke the asserts, because JAX-RS / MicroProfile REST client didn't follow the redirects.

Starting with the release: 1.11.2+, also the health endpoint was moved to the new location. Kubernetes expects http status codes: 200-400, so 301 is still considered as 'healthy'.

However: in kubernetes-like environments, the developer may be in charge to specify the health command. Then 301 (redirect) might be problematic.

The /q prefix can be removed with the following property:


The endpoints are defined in the microprofile health and microprofile metrics specifications.

Seems like Quarkus is the first microprofile runtime which moved the endpoints to a different location.

See also related issue: MicroProfile Metrics, Health, OpenAPI URI changed #15030

JavaFX Everywhere ...also in App Stores--an podcast

Subscribe to podcast via: spotify| iTunes| RSS

The #126 episode with Johan Vos (@johanvos) about:
killer JavaFX features, building JavaFX applications in Java / GraalVM, using hardware sensors on mobile devices, building Java FX / Web Components hybrids, and deploying them to all devices, also iOS and Google app stores
is available for

JPA Audits, Transactions, Lazy Loading, Table Naming, MicroProfile Config and Metrics, HTTP Patch--or 83rd

The 83rd episode covering the following topics:

"JPA audits, transactions and lazy loading, table naming conventions, schema migrations in CI, MicroProfile config refresh, MicroProfile metrics and @Gauge, JPA entities, HTTP Patch and partial updates" available:

Any questions left? Ask now: and get the answers at the next

Serializing a Collection of Java Records into a JSON Array

A collection (Set) of Java Record instances:

public record Link(String text, String uri) {}

can be serialized with JSON-B into a JSON array:

import org.junit.jupiter.api.Test;
import java.util.Set;
import javax.json.bind.Jsonb;
import javax.json.bind.JsonbBuilder;

public class JSONBTest {

    public void serialize() {
        var links = Set.of(new Link("json-b", ""),
                            new Link("jakarta ee", ""),
                            new Link("microprofile", ""));
        Jsonb jsonb = JsonbBuilder.create();
        var jsonArray = jsonb.toJson(links);

The code above generates the following output:

[{"text":"jakarta ee","uri":""},{"text":"microprofile","uri":""},{"text":"json-b","uri":""}]

Tested with Apache Johnzon:


Online Workshops
...the last 150 posts
...the last 10 comments