Chapter 4. Features

4.1. New features

MicroProfile 3.0 support

This release implements MicroProfile 3.0 by including the latest SmallRye artifacts. The following specifications have been upgraded to the versions listed below:

  • Health Check 2.0

    • This release introduces the @Liveness and @Readiness annotations, replacing the @Health annotation that is now deprecated (see also the Changed and deprecated features section below).
    • The /health/live and /health/ready endpoints are introduced in this release. The /health endpoint now serves as the unified endpoint for the @Health, @Liveness and @Readiness checks.
  • Metrics 2.0

    • The @ConcurrentGauge annotation is introduced in this release, as a replacement of the @Counter(monotonic = false) annotation (see also the Changed and deprecated features section below).
  • Rest Client 1.3

    • The Rest Client interfaces can now extend Closeable and AutoCloseable interfaces.
    • The RestClientBuilder now includes methods for SSL configuration.
MicroProfile JWT improvements

The microprofile-jwt fraction has received a number of improvements in this release. The changes are backwards compatible and not expected to break your application code.

  • The @LoginConfig annotation is no longer required, if you set the thorntail.microprofile.jwt.token.realm configuration property in your application. If you use the @LoginConfig annotation with the thorntail.microprofile.jwt.token.realm property set, ensure that the value of the realmName property of the @LoginConfig annotation matches the of the thorntail.microprofile.jwt.token.realm configuration property.
  • You can set thorntail.microprofile.jwt.enable configuration property value to false to disable the MicroProfile JWT authentication mechanism. The default value of the thorntail.microprofile.jwt.enable configuration property is true.
  • You must use the thorntail.microprofile.jwt.token.signer-pub-key-location to specify external key assets. Previously available alternate methods are deprecated. (For details, see Changed and deprecated features below.)
  • The thorntail.microprofile.jwt.path.groups configuration property can be used to select an arbitrary claim inside a JWT token to function as the groups claim expected by MicroProfile JWT. This is useful if no groups claim is present in the JWT token, but some other claim exists that contains the groups information. Unless the custom claim is a standard scope claim, its value must be formatted as an array of strings. Use the following syntax to reference a claim: path/to/claim.
  • You can use the thorntail.microprofile.jwt.claims.groups configuration property to provide a default value for the groups claim if the JWT token contains no groups information at all.
  • You can use the thorntail.microprofile.jwt.token.roles.map configuration property to inline the roles configuration in the Thorntail YAML configuration.
ejb-mdb fraction introduced
This release introduces the ejb-mdb fraction. This fraction enables you to deploy Message-Driven Beans, but it does not provide all the components required to set up a messaging infrastructure for your application. This means that you can not use this fraction to create a messaging server, but you can use it connect to an existing external messaging server, if you also provide the correct resource adapter.
Red Hat JBoss EAP 7.2.4.GA
EAP dependencies used by Thorntail have been updated and aligned with the 7.2.4.GA release of Red Hat JBoss Enterprise Application Platform.
Red Hat SSO 7.3.3.GA
This Thorntail release uses components provided by Red Hat Single Sign-On release version 7.3.3.GA.
Jaeger 0.34.0
The Jaeger client components have been updated to version 0.34.0 in this release of Thorntail.

4.2. Changed and deprecated features

Microprofile 3.0
  • Health Check 2.0

    • The @Health annotation is now deprecated. Use the @Liveness and @Readiness annotations instead.
    • The outcome and state fields in the JSON response format are replaced by the status field.

      Caution

      This is a breaking change. Ensure that you update your application code and external monitoring to avoid encountering issues with your applications after upgrading to the latest release of Thorntail.

  • Metrics 2.0

    • Some of the base metrics (defined by the MicroProfile Metrics 2.0 specification) changed their type from Counter to Gauge.
    • Some of the base metrics as well as some of the vendor metrics (provided by Thorntail) were renamed. Notably, the names of all accumulating counters now contain the suffix total.
    • In the OpenMetrics output format (formerly known as the Prometheus format), the metric scope and name are now separated by an underscore (_) symbol. This replaces the colon (:) symbol used as the separator in previous releases.
    • Metrics are no longer identified by their String name, but by a MetricID class. The MetricID consists of a String name and a set of key-value pairs called tags. In application code, this set of tags is represented as Map<String, String>.
    • The @Counted annotation no longer includes the monotonic parameter. Previously, the default value of the monotonic parameter was false. Now, the @Counter annotation always behaves as if the monotonic parameter was set to true. When you want your annotation to behave as when monotonic is set to false, use the @ConcurrentGauge annotation instead.

      Caution

      These are breaking changes. Ensure that you update your application code and external monitoring configuration to avoid encountering issues with your applications after upgrading to the latest release of Thorntail.

  • Rest Client 1.3

    • In this release, Thorntail replaces the MicroProfile Rest Client implementation from the SmallRye project, with the MicroProfile Rest Client implementation from RESTEasy. As a result of this change, all public APIs and SPIs that were previously present in the io.smallrye.restclient package, such as RestClientProxy, are now part of the org.jboss.resteasy.microprofile.client package. Ensure that you use the new package name in your code and logging configuration.
    • The specification now mandates that application/json is used as a default media type, if the Rest Client interface does not include the @Produces/@Consumes annotations. If you do not use the @Produces/@Consumes annotations in your client interfaces, this change might break your application.

      Caution

      These are breaking changes. Ensure that you update your application code and logging configuration to avoid encountering issues with your applications after upgrading to the latest release of Thorntail.

MicroProfile JWT

When specifying external key assets, the following referencing methods are now deprecated:

  • Using the file: and classpath: prefixes in the value of the thorntail.microprofile.jwt.token.signer-pub-key configuration property to point to the location of an external key asset.
  • Using the thorntail.microprofile.jwt.token.jwks-uri configuration property to refer to an external JWK Set.

Instead, use thorntail.microprofile.jwt.token.signer-pub-key-location configuration property to reference external key assets.

Using configuration properties in the thorntail.microprofile.jwtauth namespace is now deprecated. While this is not a breaking change, you are encouraged to update your configuration to use properties from the thorntail.microprofile.jwt namespace.

The wildfly-swarm.useUberJar system property

The wildfly-swarm.useUberJar system property previously used by the Thorntail Maven plugin is no longer recognized. To ensure that Thorntail Maven plugin runs in uberjar mode (as opposed to classpath mode), use the thorntail.useUberJar system property.

Caution

This is a breaking change. Ensure that you use the new name when running Maven to avoid encountering issues with your applications after upgrading to the latest release of Thorntail.

4.3. Technology preview

No technology preview features have been introduced in this release.