Thorntail 2.4.0.Final offers support for Java 11 and MicroProfile 2.2

Share
  • March 20, 2019

Thorntail 2.4.0.Final is here! This release includes a bunch of updates and offers support for Java 11 and Microprofile 2.2.

Don’t recognize the name? Thorntail was released in 2015 under the name WildFly Swarm. Fear not, they are one and the same. The name change came with the 2.0.0 update in June 2018.

What’s new in Thorntail 2.4.0.Final?

  • Java 11 support
  • MicroProfile 2.2 support
  • MicroProfile JWT improvements
  • Gradle improvements
  • Thorntail Runner improvements

Java 11 support

Thorntail now works with Java 11, both for building an uberjar and running it, according to the blog post announcing the latest version. However, keep in mind that modulepath is not supported; Thorntail only runs on classpath.

It’s no secret that migrating from Java 8 to 11 is a difficult task, which means that some components that are brought in as transitive dependencies are still not fully ready for Java 11. You might notice the following examples:

  • ISPN-9720illegal reflective access operation in Infinispan
  • JBMAR-216: wrong reflection usage in JBoss Marshalling

These new versions will seep into Thorntail over time, as the team updates to new WildFly releases.

Since Thorntail is built on top of WildFly, it has its own module system: JBoss Modules. On Java 8, it imitates the Java module system and on Java 9 and beyond, the two module systems are integrated. Therefore, if you want to use a new feature from Java 11 which is only available in an extra module, you will also have to declare a module dependency.

A prime example is the new Java HTTP Client, which exists in the java.net.http module. In order to use it in a Thorntail application, it needs to express a dependency on this module. However, since Thorntail doesn’t support running on modulepath, expressing a dependency does not mean adding module-info.java. What you should do instead is use the same mechanism you’ve been using in WildFly and Thorntail all the time: jboss-deployment-structure.xml:



    
        
            
        
    

This file must be placed in the WEB-INF directory in your WAR (or META-INF in case your application is a JAR).

MicroProfile 2.2 support

As mentioned above, Thorntail now implements MicroProfile 2.2 by including the latest SmallRye artifacts. The following specifications have been updated to a new version:

  • Fault Tolerance 2.0
  • OpenAPI 1.1
  • OpenTracing 1.3
  • Rest Client 1.2

MicroProfile JWT improvements

There’s a new fraction which improves Keycloak integration with MicroProfile JWT: keycloak-microprofile-jwt. Plus, it is now much easier to configure MicroProfile JWT itself.

Gradle improvements

Thorntail Gradle plugin has been improved (again!) in 2.4.0.Final.

Thorntail Runner improvements

Thorntail Runner has been updated to better support working with multi-module projects in the IDE.

 

The release notes for Thorntail 2.4.0.Final are available here

The post Thorntail 2.4.0.Final offers support for Java 11 and MicroProfile 2.2 appeared first on JAXenter.

Source : JAXenter