WildFly 21: How to Customize Your Server with Galleon Layers and Provisioning Tools
- singvagahelpmorrea
- Aug 7, 2023
- 10 min read
How to Download and Install WildFly 21
If you are looking for a fast, lightweight, and powerful application server for your Java web applications, you might want to consider WildFly 21. WildFly 21 is the latest release in a series of open-source application server offerings from JBoss, now part of Red Hat. In this article, we will show you how to download and install WildFly 21 on your system, and how to verify the installation.
download wildfly 21
What is WildFly 21?
WildFly 21 is an exceptionally fast, lightweight, and powerful implementation of the Jakarta Platform specifications. The Jakarta Platform is the successor of the Java EE platform, which defines a set of APIs and features for developing enterprise applications. WildFly 21 supports both the Jakarta EE Full Platform and the Jakarta EE Web Profile, as well as the Eclipse MicroProfile platform, which provides a set of specifications for building cloud-native microservices.
Features and benefits of WildFly 21
Some of the features and benefits of WildFly 21 are:
It is based on a modular service container architecture that enables services on-demand when your application requires them.
It supports hot deployment and dynamic reloading of applications, which means you can update your applications without restarting the server.
It provides high performance, scalability, and reliability for your applications, with features such as clustering, load balancing, caching, messaging, transactions, security, and management.
It offers a variety of ways to install and run the server, such as unzipping the traditional server zip, provisioning a customized server using the Galleon tool, or building and running a bootable JAR that contains both the server and your application.
It is compatible with popular development tools and frameworks, such as Maven, Gradle, Eclipse, IntelliJ IDEA, Spring Boot, Quarkus, etc.
It is free and open source, with an active community of developers and users.
WildFly 21 vs other application servers
How does WildFly 21 compare to other Java application servers? Here are some points to consider:
WildFly 21 is one of the few application servers that support both Jakarta EE Full Platform and Jakarta EE Web Profile. Other application servers may only support one or the other, or none at all.
WildFly 21 is also one of the few application servers that support Eclipse MicroProfile platform, which is a standard for building cloud-native microservices. Other application servers may have their own proprietary solutions for microservices.
WildFly 21 has a smaller footprint and faster startup time than most other application servers. This makes it ideal for cloud deployment scenarios where resources are limited and speed is essential.
WildFly 21 has more frequent releases than most other application servers. This means it can deliver new features and bug fixes more quickly to its users.
How to download WildFly 21
The first step to install WildFly 21 is to download it from its official website. There are different options for downloading WildFly 21 depending on your needs.
How to download wildfly 21 zip file
Wildfly 21 download for windows 10
Wildfly 21 bootable jar tutorial
Wildfly 21 galleon layers examples
Wildfly 21 final release notes
Wildfly 21 installation guide pdf
Wildfly 21 vs jboss eap 7 comparison
Wildfly 21 microprofile platform support
Wildfly 21 jakarta ee 8 full and web distribution
Wildfly 21 servlet-only distribution size
Wildfly 21 application server source code github
Wildfly 21 quick start source code download
Wildfly 21 ejb lite galleon layer configuration
Wildfly 21 jdr subsystem usage and benefits
Wildfly 21 jsf galleon layer dependencies
Wildfly 21 jsonb and jsonp galleon layers integration
Wildfly 21 mail galleon layer setup and configuration
Wildfly 21 messaging-activemq galleon layer features
Wildfly 21 remote-activemq galleon layer documentation
Wildfly 21 pojo galleon layer for legacy applications
Wildfly 21 sar galleon layer for mbean deployment
Wildfly 21 webservices galleon layer for xml web services
Wildfly 21 web-console galleon layer for hal web console
Wildfly 21 batch-jberet galleon layer for jakarta batch
Wildfly 21 ejb galleon layer for jakarta enterprise beans
Wildfly 21 ejb-dist-cache galleon layer for infinispan distributed caching
Wildfly 21 ejb-local-cache galleon layer for infinispan local caching
How to update wildfly from version 20 to version 21
How to migrate from wildfly preview ee 9.1 to wildfly preview ee10.0
How to use jkube maven plugin to deploy wildfly bootable jar on openshift
How to customize wildfly bootable jar using maven plugin parameters
How to provision a customized wildfly instance using galleon cli tool
How to run wildfly bootable jar as a service on linux or windows
How to debug wildfly bootable jar applications using eclipse or intellij idea
How to monitor wildfly bootable jar performance and metrics using prometheus and grafana
How to secure wildfly bootable jar applications using keycloak and openid connect
How to test wildfly bootable jar applications using arquillian and junit
How to build a microservice architecture using wildfly bootable jar and quarkus
How to use docker and kubernetes to deploy and scale wildfly bootable jar applications
How to use camel and kafka to integrate wildfly bootable jar applications with other systems
How to use hibernate and postgresql to persist data in wildfly bootable jar applications
How to use resteasy and jax-rs to expose restful web services in wildfly bootable jar applications
How to use cdi and weld to implement dependency injection in wildfly bootable jar applications
How to use bean validation and hibernate validator to validate data in wildfly bootable jar applications
How to use jpa and eclipselink to access relational databases in wildfly bootable jar applications
How to use jaxb and moxy to handle xml data in wildfly bootable jar applications
How to use jms and hornetq to send and receive messages in wildfly bootable jar applications
How to use jta and narayana to manage transactions in wildfly bootable jar applications
Download options for WildFly 21
You can download WildFly 21 from . You will see three main options:
WildFly Distribution: This is the traditional server zip file that contains the full server distribution. You can unzip it to any location on your system and run it as a standalone server or as a domain of servers. This option is suitable for most users who want to try out WildFly 21 or use it for development and testing purposes.
WildFly Galleon: This is a tool that allows you to provision a customized server based on your application needs. You can select the features and layers that you want to include in your server, and Galleon will create a tailored server for you. This option is suitable for users who want to optimize their server size and performance, or who want to use WildFly 21 as an embedded server.
WildFly Bootable JAR: This is a way to package your application and the server into a single executable JAR file that can be run with a simple java -jar command. This option is suitable for users who want to simplify their deployment process, or who want to use WildFly 21 as a microservice platform.
System requirements for WildFly 21
Before you download WildFly 21, you should check the system requirements for running it. The minimum system requirements are:
A Java Development Kit (JDK) version 8 or higher. You can download the JDK from .
A minimum of 128 MB of free memory for the server and 512 MB of free memory for the application.
A minimum of 100 MB of free disk space for the server and 500 MB of free disk space for the application.
A supported operating system, such as Windows, Linux, MacOS, or Solaris.
How to install WildFly 21
Once you have downloaded WildFly 21, you can install it on your system using one of the following methods:
Installing WildFly 21 from a zipped distribution
This is the easiest way to install WildFly 21. You just need to unzip the downloaded file to any location on your system. For example, if you downloaded the file wildfly-21.0.0.Final.zip to your Downloads folder, you can unzip it using the following command:
unzip /Downloads/wildfly-21.0.0.Final.zip -d /wildfly
This will create a folder named wildfly in your home directory, which contains the server files. You can rename or move this folder to any location you prefer.
Installing WildFly 21 with Galleon
This is a more advanced way to install WildFly 21. You need to download and install Galleon first, which is available from . You can download the latest version of Galleon, which is galleon-4.2.9.Final.zip at the time of writing, and unzip it to any location on your system. For example, if you downloaded the file galleon-4.2.9.Final.zip to your Downloads folder, you can unzip it using the following command:
unzip /Downloads/galleon-4.2.9.Final.zip -d /galleon
This will create a folder named galleon in your home directory, which contains the Galleon tool files. You can rename or move this folder to any location you prefer.
Next, you need to use Galleon to provision a customized server based on your application needs. You can use the following command to see the available features and layers that you can include in your server:
/galleon/bin/galleon.sh info wildfly:current
This will show you something like this:
Produced by: wildfly Feature-pack: wildfly:current#21.0.0.Final Name: WildFly Description: A flexible, lightweight, managed application runtime widely used for both development and production. Category: Server Default config: standalone.xml Configs: Name: standalone-microprofile.xml Description: A configuration with only MicroProfile capabilities enabled. Layers: Name: microprofile-platform Description: Support for Eclipse MicroProfile Name: standalone.xml Description: A default configuration containing common services. Layers: Name: base-server Description: The base configuration layer. Name: web-server Description: The web server configuration layer. Name: ejb-lite Description: Support for EJB Lite. Name: ejb Description: Support for EJB. Name: jpa Description: Support for JPA. Name: jaxrs Description: Support for JAX-RS. Name: cdi Description: Support for CDI. Name: jsf Description: Support for JSF. Name: jms-activemq Description: Support for JMS with ActiveMQ Artemis. Name: microprofile-platform Description: Support for Eclipse MicroProfile. Name: domain.xml Description: A default domain configuration containing common services. Layers: Name: base-server Description: The base configuration layer. Name: web-server Description: The web server configuration layer. Name: ejb-lite Description: Support for EJB Lite. Name: ejb Description: Support for EJB. Name: jpa Description: Support for JPA. Name: jaxrs Description: Support for JAX-RS. Name: cdi Description: Support for CDI. Name: jsf Description: Support for JSF. Name: jms-activemq Description: Support for JMS with ActiveMQ Artemis. Name: microprofile-platform Description: Support for Eclipse MicroProfile.
You can choose one of the predefined configs, or create your own config by selecting the layers that you want. For example, if you want to create a server that supports web, ejb, jpa, and microprofile, you can use the following command:
/galleon/bin/galleon.sh provision wildfly:microprofile-platform,wildfly:jpa,wildfly:jaxrs,wildfly:eclipse-microprofile --dir=/wildfly-custom
This will create a folder named wildfly-custom in your home directory, which contains the customized server. You can rename or move this folder to any location you prefer.
Building and running a WildFly bootable JAR
This is another way to install WildFly 21. You need to have Maven installed on your system, which is available from . You also need to have a Maven project that contains your application code and dependencies. You can use the WildFly Bootable JAR Maven plugin to build and run a bootable JAR that contains both your application and the server. For example, if you have a Maven project named my-app in your workspace folder, you can add the following plugin configuration to your pom.xml file:
<build> <plugins> <plugin> <groupId>org.wildfly.plugins</groupId> <artifactId>wildfly-jar-maven-plugin</artifactId> <version>4.0.1.Final</version> <executions> <execution> <goals> <goal>package</goal> </goals> </execution> </executions> <configuration> <feature-packs> <feature-pack> <groupId>org.wildfly.core</groupId> <artifactId>wildfly-core-galleon-pack</artifactId> <version>14.0.1.Final</version> </feature-pack> <feature-pack> <groupId>org.wildfly</groupId> <artifactId>wildfly-servlet-galleon-pack</artifactId> <version>21.0.0.Final</version> </feature-pack> <feature-pack> <groupId>org.wildfly</groupId> <artifactId>wildfly-ee-galleon-pack</artifactId> <version>21.0.0.Final</version> </feature-pack> <feature-pack> <groupId>org.wildfly</groupId> <artifactId>wildfly-microprofile-galleon-pack</artifactId> <version>21.0.0.Final</version> </feature-pack> </feature-packs> <layers> <layer>web-server</layer> <layer>ejb</layer> <layer>jpa</layer> <layer>microprofile-platform</layer> </layers> </configuration> </plugin> </plugins> </build>
Then, you can use the following command to build the bootable JAR file:
mvn package
This will create a file named my-app-bootable.jar in the target folder of your project, which contains both your application and the server. You can rename or move this file to any location you prefer.
How to verify the installation of WildFly 21
After you have installed WildFly 21 using one of the methods above, you can verify the installation by starting and stopping the server, and accessing the management console and CLI of the server.
Starting and stopping WildFly 21
To start WildFly 21, you can use one of the following commands depending on how you installed it:
If you installed WildFly 21 from a zipped distribution, you can use the following command to start the server in standalone mode:
/wildfly/bin/standalone.sh
If you installed WildFly 21 with Galleon, you can use the same command as above to start the customized server in standalone mode:
/wildfly-custom/bin/standalone.sh
If you built a WildFly bootable JAR, you can use the following command to run the bootable JAR file:
java -jar my-app-bootable.jar
To stop WildFly 21, you can use one of the following commands depending on how you started it:
If you started WildFly 21 from a zipped distribution or with Galleon, you can use the following command to stop the server in standalone mode:
/wildfly/bin/jboss-cli.sh --connect --command=:shutdown
If you ran a WildFly bootable JAR, you can use Ctrl+C to stop the bootable JAR process.
Accessing the management console and CLI of WildFly 21
To access the management console and CLI of WildFly 21, you need to have a user account with administrative privileges. You can create such an account using the following command:
/wildfly/bin/add-user.sh
This will prompt you to enter some information, such as the user name, password, and role. You should choose a for Application User and assign the user to the Administrator role.
After you have created a user account, you can access the management console and CLI of WildFly 21 using one of the following methods:
To access the management console, open a web browser and go to . You will be asked to enter your user name and password. After logging in, you will see a graphical interface that allows you to manage and monitor your server and applications.
To access the CLI, open a terminal and use the following command:
/wildfly/bin/jboss-cli.sh --connect
You will be asked to enter your user name and password. After logging in, you will see a command-line interface that allows you to execute commands and scripts to manage and monitor your server and applications.
Conclusion
In this article, we have shown you how to download and install WildFly 21 on your system, and how to verify the installation. We have also explained what is WildFly 21, what are its features and benefits, and how it compares to other application servers. We hope that this article has helped you to get started with WildFly 21 and enjoy its fast, lightweight, and powerful capabilities.
FAQs
Q: What is the difference between WildFly and JBoss?
A: WildFly is the new name for JBoss Application Server since version 8.0.0.Final. JBoss is now a brand name for a family of products from Red Hat that includes WildFly as well as other middleware products such as JBoss EAP, JBoss Fuse, JBoss Data Grid, etc.
Q: How can I update WildFly 21 standalone/deployments or /wildfly-custom/standalone/deployments. The server will automatically detect and deploy your application.
If you have a Maven project, you can use the WildFly Maven plugin to deploy your application to the server. You can add the following plugin configuration to your pom.xml file:
<build> <plugins> <plugin> <groupId>org.wildfly.plugins</groupId> <artifactId>wildfly-maven-plugin</artifactId> <version>2.0.2.Final</version> <configuration> <hostname>localhost</hostname> <port>9990</port> <username>admin</username> <password>admin</password> </configuration> </plugin> </plugins> </build>
Then, you can use the following command to deploy your application to the server:
mvn wildfly:deploy
If you have a WildFly bootable JAR, you don't need to deploy your application separately, as it is already packaged with the server. You just need to run the bootable JAR file as described above.
Q: How can I troubleshoot WildFly 21?
A: You can troubleshoot WildFly 21 using the following methods:
You can check the log files of the server, which are located in the log folder of your server, such as /wildfly/standalone/log or /wildfly-custom/standalone/log. The log files contain information about the server status, errors, warnings, and messages.
You can use the management console or CLI of the server to monitor and manage your server and applications. You can view the metrics, statistics, configuration, deployments, subsystems, and operations of your server and applications.
You can use the debugging tools and frameworks that are compatible with WildFly 21, such as Eclipse, IntelliJ IDEA, JUnit, Arquillian, etc. You can attach a debugger to the server process and set breakpoints, watch variables, and step through the code of your application.
Q: Where can I find more information about WildFly 21?
A: You can find more information about WildFly 21 from the following sources:
The official website of WildFly:
The official documentation of WildFly:
The official blog of WildFly:
The official forum of WildFly:
The official GitHub repository of WildFly:
44f88ac181
Comments