Skip to content
ES EN
Theme: automatic

Guide to Testing Quarkus 4.0 and JDK 28's Vector API in Your Environment

A practical plan to evaluate Quarkus 4.0, early-access JDK 28, and the Vector API without breaking your current project, with warnings about Hibernate Reactive 5.0.

Software engineering

The latest round of news from the Java ecosystem brings several things worth thoroughly testing: the GA release of Quarkus 4.0, early-access builds of JDK 28, and a new incubation of the Vector API. In this guide, we'll set up a small test plan to evaluate everything without touching your main branch.

We can't promise that every piece will fit into your project: Quarkus 4.0 raises the baseline requirements, and JDK 28 is still in development. That's why it's advisable to test on an isolated branch and measure before deciding anything.

What You'll Need

  • A test Quarkus project (or a copy of a real one) under version control, so you can revert changes.
  • JDK 21 minimum, which is the new baseline for Quarkus 4.0, and optionally the early-access builds of JDK 28 for the Vector API.
  • The 4.0 release notes open for easy reference on dependency changes.
  • A way to measure before and after: load tests or, at least, startup times and latencies of your main endpoints.
A code editor screen with an open Java project next to a compilation terminal
Working on an isolated branch allows for risk-free comparison of results. Image: Unsplash — a computer screen with a program running on it

What's New in Quarkus 4.0

After two years of work, Quarkus 4.0 establishes a baseline of JDK 21, Vert.x 5, Netty 4.2, and Jackson 3. It adds an optional HTTP/3 extension for both the server and the REST client, support for the Jakarta Contexts & Dependency Injection 5.0 specification, and the ability to enable virtual threads by default on REST endpoints.

The most delicate changes are the jump to Jackson 3 and Vert.x 5: if your code or libraries depend on APIs from previous versions, that's where we expect friction. The release notes for versions 4.0.0 and 4.0.1 are the place to confirm the details.

  1. Create a new branch from your Quarkus project and record baseline metrics: startup time, p95 latency, and memory consumption.
  2. Ensure you are compiling with JDK 21 or higher before touching anything else.
  3. Update the Quarkus version to 4.0.1 in your build file and recompile.
  4. Review and fix any compilation errors related to Jackson 3, Vert.x 5, and Netty 4.2, consulting the release notes as you go.
  5. Enable virtual threads by default on REST endpoints as a separate experiment and repeat the measurements.
  6. If your application uses HTTP/3, only test the new extension after the previous steps are working, as it is opt-in.
  7. Compare before-and-after metrics and decide if the upgrade is worth it for your use case.
java -version
# Check that your environment reports 21 or higher before updating Quarkus
Tip Change only one thing per test. If you update Quarkus and enable virtual threads at the same time, you won't know which change moved the metrics. First, migrate and measure; then experiment and measure again.

Testing the Vector API with JDK 28

JEP 548 proposes the thirteenth incubation of the Vector API for JDK 28, following twelve rounds between JDK 16 and JDK 27. The new feature is support for 16-bit floating-point vectors (IEEE 754 binary16 format). The API will continue to incubate until Project Valhalla offers the necessary features in preview mode.

As an incubating module, it must be explicitly enabled, and its interface may change between versions. Use it in an isolated microbenchmark, never as a dependency for critical code. If you find bugs, report them in the Java Bug Database; the JDK 28 release notes page details changes for each build.

Performance comparison graph between two executions of the same program
Measuring before and after is what turns a migration into an informed decision. Image: Unsplash — A computer screen with a bunch of lines on it

A Warning About Hibernate Reactive

If you use Hibernate Reactive, keep in mind that version 5.0.0.Final is the last in its line and has been declared end-of-life, while 5.1.0.CR3 is progressing. Additionally, the hibernate.jdbc.time_zone property changes its behavior with time columns to align with Hibernate ORM. Review your temporal mappings before updating.

Original source: infoq.com

Article generated with AI.larebelion

Kernel

· Head of Technology · Spain

«Upgrading is easy to decide and expensive to execute: measure before you migrate, not after.»

Comments (0)

No comments yet. You can be the first.

Write a comment