We are pleased to announce the 1.2.0 release of Helidon. This release adds support for MicroProfile 2.2 and includes additional bug and performance fixes. Let’s take a closer look at what’s in the release.
MicroProfile is now a de-facto standard for Java cloud-native APIs. One of the main goals of project Helidon is to deliver support for the latest MicroProfile APIs. The Helidon MicroProfile implementation is called Helidon MP and along with the reactive, non-blocking framework called Helidon SE it builds the core of Helidon.
We have been adding support for newer MicroProfile specifications one by one during the last few releases. The 1.2.0 release brings MicroProfile REST Client 1.2.1 and Open Tracing 1.3. With these pieces in place we now have full MicroProfile 2.2 support.
The full list of supported MicroProfile and Java EE APIs is listed on this image:
As you see, we added support for two more Java EE APIs: JPA (Persistence) and JTA (Transaction). It’s in early access at the moment. You should consider it as a preview. We are still working on it and the implementation and configuration is subject to change.
Here are some examples of using new APIs added in Helidon 1.2.0.
MicroProfile REST Client sample
Register a rest client interface (can be the same one that is implemented by the JAX-RS resource). Note that the URI can be overridden using configuration.
Declare the rest client in a class using it (such as a JAX-RS resource in a different microservice):
And simply use the field to invoke the remote service (this example proxies the request to the remote service):
Health Check 2.0 sample
Health Check 2.0 has two types of checks (in previous versions a single type existed):
- Readiness — used by clients (such as Kubernetes readiness check) to check if the service has started and can be used
- Liveness — used by clients (such as Kubernetes liveness checks) to check if the service is still up and running
Simply annotate an application scoped bean with the appropriate annotation (@Readiness or @Liveness) to create a health check:
Open Tracing Sample
MP Open Tracing adds a single annotation: @Traced, to add tracing to CDI beans.
Tracing of JAX-RS resources is automated (and can be disabled with the @Traced). Example of the bean used in the Health check example (the method getMessage is traced):
In addition to MicroProfile 2.2, Helidon 1.2.0 contains a couple other enhancements:
- HTTP Access Log support for Helidon MP and SE.
- Early Access: Oracle Universal Connection Pool support: this lets you configure and inject the Oracle UCP JDBC driver as a DataSource in your Helidon MP application.
More to Come
With MicroProfile 2.2 support, Helidon has caught up with most of the other main MicroProfile implementations. We are now pushing Helidon towards MicroProfile 3.0, and we’ve already taken the first steps. That’s why we put a plus after 2.2 in the title. We already have support for Health Check 2.0 (and we’ll support it in a backwards compatible way). That leaves Metrics 2.0 and REST Client 1.3 and we are working hard to deliver it next month.
Thanks to Tomas Langer for helping with samples and to Joe Di Pol for great conversational style.