BT

Facilitating the Spread of Knowledge and Innovation in Professional Software Development

Write for InfoQ

Topics

Choose your language

InfoQ Homepage News WildFly 32 Delivers Preview of Jakarta EE 11 and Final Version of WildFly Glow

WildFly 32 Delivers Preview of Jakarta EE 11 and Final Version of WildFly Glow

The WildFly team has released WildFly version 32, promoting WildFly Glow to Final and providing a preview of Jakarta EE 11. WildFly Glow, a set of tools that analyzes application artifacts, e.g. a WAR file, determines which WildFly dependencies the artifact is using and suggests the correct layers for packaging the application with the WildFly runtime. 

The Glow tools aim to solve the common challenges inherent in monolithic application servers with runtime automation, bundling, and installation. 

WildFly Glow includes a command-line interface (CLI), a Maven plugin, and an Arquilian plugin. Glow analyzes compiled Java code, i.e., an artifact commonly known as the WAR file. It then determines which specific components of WildFly (feature packs) and Galleon layers (modular pieces of the server environment) are necessary to run the application correctly. It can make suggestions based on the code usage, e.g., suggestions to include SSL, a particular database driver, a Messaging connector (Jakarta Messaging or reactive), or the WildFly HA (High Availability) profile, etc. Furthermore, the Arquillian plugin can analyze the test cases to build a WildFly instance. This new way of consuming the WildFly application server enables a custom-built server that only has the required dependencies and features. 

The WildFly engineering team also mentioned in a recent WildFly mini-conference that they have observed a 5% to 55% reduction in disk usage and 5% to 32% in memory consumption with WildFly Glow compared to Galleon. 

The following commands can be used with the Glow CLI to render different output

wildfly-glow scan target/frdemo.war ❶
wildfly-glow scan target/frdemo.war --ha ❷
wildfly-glow scan target/frdemo.war --provision BOOTABLE_JAR ❸
wildfly-glow scan target/frdemo.war --provision DOCKER_IMAGE ❹
wildfly-glow scan examples/kitchensink.war --cloud --provision OPENSHIFT ❺

The above commands can be explained as follows:
❶ Scans a war file for its content e.g. looking up modules used 
❷ Scans the war file and will create an HA runtime
❸ Scans and produces a bootable JAR (Java archive) 
❹ Scans and produces a docker image for the application.
❺ Scans and produces a cloud build deployed to the OpenShift cluster (a distribution of Kubernetes)

The following is an example of an application that uses Kafka (MicroProfile Reactive Messaging specification), a PostgreSQL database, the Jakarta Persistence specification and the Jakarta EE Core Profile
 

./wildfly-glow scan first-responder-demo/backend/target/frdemo-backend.war --add-ons=postgresql --cloud --provision DOCKER_IMAGE

The above command renders a Docker image that can then be run on any Kubernetes platform. However the following output has some interesting insights. 

WildFly Glow is scanning...
galleon discovery ❶
- feature-packs
   org.wildfly:wildfly-galleon-pack:32.0.0.Final
   org.wildfly.cloud:wildfly-cloud-galleon-pack:7.0.0.Final
   org.wildfly:wildfly-datasources-galleon-pack:8.0.0.Final
- layers
   ee-core-profile-server
   jpa
   microprofile-reactive-messaging-kafka
   postgresql-datasource

enabled add-ons ❷
- health : Support for runtime health checks.
- kafka : Support for the MicroProfile Reactive Messaging Kafka connector.
- postgresql : Documentation in https://github.com/wildfly-extras/wildfly-datasources-galleon-pack
- wildfly-cli : Server command line tools: jboss-cli, add-user, elytron-tool.

identified fixes
* unbound datasources error: java:/FRDemoDS is fixed
  - add-on postgresql fixes the problem but you need to set the strongly suggested configuration.

deployers that would get automatically enabled when deploying to openshift
- openshift/postgresql ❸

Generating docker image...

The output can be explained as follows:
❶ Galleon discovery has detected the layers that are required to build an image. (ee-core-profile, jpa, MicroProfile reactive messaging for Kafka and a PostgreSQL datasource)
❷ Furthermore, it has also identified datasource errors, in this case the environment variables for the datasource itself. 
❸ Lastly, deployers; this image can also be deployed on an OpenShift environment. 

WildFly Glow has also released a Maven plugin, which is particularly useful when integrating with Arquillian, a testing platform for Java applications. This plugin facilitates the automation of the provisioning process, making it easier to prepare environments for testing without manual intervention. To use the plugin, the following dependency can be added to a Maven pom.xml file.

<dependency>
    <groupId>org.wildfly.glow</groupId>
    <artifactId>glow-arquillian-plugin</artifactId>
    <version>1.0.5.Final</version>
</dependency>

Furthermore, WildFly 32 expands the use of feature stability levels introduced in WildFly 31, categorizing features into experimental, preview, community, or default levels. This allows users to manage the risk and exposure of new features according to their stability and readiness.

WildFly 32 supports Jakarta EE 10 and MicroProfile 6.1 specifications. It runs on JDK 11 and 17 and recommends JDK 21 for optimal performance and feature support. WildFly 32 also adds preview features, such as Jakarta EE 11. WildFly 34 is the planned release for full support of Jakarta EE 11

A detailed blog post and release notes are available on the WildFly page.

About the Author

Rate this Article

Adoption
Style

BT