Java EE WildFly Tutorial: Mastering Jakarta EE 11 On WildFly 35 In 2026
The enterprise Java landscape has undergone a monumental transformation, and by 2026, the transition from legacy Java EE to the modernized Jakarta EE 11 ecosystem is complete. WildFly remains the premier open-source application server for developers seeking a balance between lightweight performance and full-stack enterprise capabilities. This tutorial provides a definitive guide to deploying, configuring, and optimizing Jakarta EE 11 applications on WildFly 35, the current industry standard for high-performance application runtimes.
Jakarta EE 11, released to leverage the advancements of Java 21 and the newly debuted Java 25 LTS, introduces significant enhancements in virtual threads (Project Loom) integration and cloud-native alignment. WildFly 35 serves as the perfect vessel for these advancements, offering a modular "Galleon" based architecture that allows developers to trim the server to only the necessary subsystems, reducing the memory footprint and attack surface for modern microservices and monolithic deployments alike.
Evolution of Enterprise Java: From Java EE to Jakarta EE 11
Understanding the current state of enterprise Java is essential for any architect. While the term "Java EE" is still frequently used in search queries, the industry has fully migrated to the Jakarta EE namespace (jakarta.). In 2026, applications still running on the old javax. namespace are considered legacy and require the Eclipse Transformer tool to run on modern WildFly versions.
WildFly 35 provides full certification for the Jakarta EE 11 Full Platform and Web Profile. This version is specifically optimized for JDK 21 and JDK 25, ensuring that your enterprise applications can utilize virtual threads for high-concurrency I/O operations without the overhead of traditional thread pooling.
Essential Prerequisites and Environment Setup
Before initiating the WildFly installation, ensure your environment meets the 2026 technical benchmarks for enterprise stability.
- Java Development Kit (JDK): Install JDK 21 or the latest JDK 25 LTS. WildFly 35 requires a minimum of JDK 17, but the performance gains from the Java 25 Garbage Collection (ZGC) improvements are substantial for enterprise workloads.
- Build Tool: Apache Maven 3.9 or Gradle 8.x are the recommended tools. Ensure your pom.xml or build.gradle files are updated to reference the Jakarta EE 11 API coordinates.
- Operating System: While WildFly is platform-independent, 2026 production environments typically utilize Red Hat Enterprise Linux 9.4+ or specialized container-optimized distributions like Fedora CoreOS.
WildFly 35 Distribution Comparison
The following table outlines the different WildFly distributions available in 2026 to help you choose the right starting point for your project.
| Distribution Type | Jakarta EE Profile | Primary Use Case | Footprint (Approx.) |
|---|---|---|---|
| WildFly Full | Full Platform | Legacy migrations, EJB, Web Services, Messaging | 220 MB |
| WildFly Web | Web Profile | Modern web apps, Jakarta REST, CDI, Persistence | 160 MB |
| WildFly Cloud | Core/MicroProfile | Containerized microservices, OpenShift, Kubernetes | 95 MB |
| WildFly Preview | Jakarta EE 12 (Draft) | Testing experimental features and future specs | 230 MB |
WildFly 9 on NetBeans, Eclipse, IntelliJ, OpenShift, and Maven - Java ...
Step-by-Step Installation and Basic Configuration
To begin, download the WildFly 35.0.0.Final distribution from the official community website. Extract the compressed archive to your preferred directory, hereafter referred to as WILDFLY_HOME.
Initial Server Start
Navigate to the WILDFLY_HOME/bin directory in your terminal. To start the server in standalone mode, which is the most common for single-node deployments, execute the command: ./standalone.sh (Linux/macOS) or standalone.bat (Windows).
Once initialized, the server is accessible via the default web port 8080 and the management port 9990.
Administrative User Security
WildFly does not ship with a default administrative user for security reasons. You must create one by running the add-user.sh script. Choose Management User, provide a username, and a strong password. This user will grant you access to the Web Management Console located at http://localhost:9990.
Expert Insight on Management Security
In 2026, it is a critical security standard to bind the management interface only to a private internal network or a specific VPN IP. Never leave the management port 9990 exposed to the public internet. Use the -bmanagement flag during startup to bind the management interface to a specific secured IP address.
Developing a Jakarta EE 11 Application for WildFly
Modern Jakarta EE development focuses on three core pillars: Jakarta Contexts and Dependency Injection (CDI) 4.1, Jakarta RESTful Web Services 4.0, and Jakarta Persistence (JPA) 3.2.
Project Structure and Maven Configuration
Your Maven project should target the Jakarta EE 11 bill of materials (BOM). In your pom.xml, include the dependency for jakarta.jakartaee-api with a scope of provided, as WildFly already contains these libraries.
The file structure should follow standard conventions:
- src/main/java: Your application source code.
- src/main/resources/META-INF: Contains persistence.xml for database configurations.
- src/main/webapp/WEB-INF: Contains beans.xml (to enable CDI) and the optional web.xml.
Implementing a RESTful Endpoint
Create a Java class and annotate it with @Path and @ApplicationScoped. Use @GET or @POST annotations to define the HTTP methods. With Jakarta EE 11, you can now seamlessly use Java Records as DTOs (Data Transfer Objects), and the JSON-B provider will automatically handle the serialization.
Database Connectivity (JPA and Datasources)
WildFly manages database connections through the Datasource subsystem.
- Driver Deployment: Download the JDBC driver for your database (e.g., PostgreSQL 17 or MySQL 9.0). Deploy the JAR as a module or simply drop it into the deployments folder.
- Datasource Definition: Define the datasource in the standalone.xml file or via the Management CLI using the command: data-source add --name=MyDS --jndi-name=java:jboss/datasources/MyDS --driver-name=postgresql --connection-url=jdbc:postgresql://localhost:5432/mydb.
Deployment Strategies and Lifecycle Management
Deployment in WildFly 35 can be handled through multiple channels depending on your CI/CD maturity.
- Manual Deployment: Copy your .war file directly into the WILDFLY_HOME/standalone/deployments directory. The server's scanner will automatically detect and deploy the file.
- Management CLI: Use the jboss-cli.sh tool for automated scripts. The command deploy path/to/myapp.war provides a robust way to push updates without manual file handling.
- Maven Plugin: The wildfly-maven-plugin is the gold standard for developer productivity. By running mvn wildfly:deploy, the build tool compiles, packages, and uploads the application to a running WildFly instance in one step.
Performance Tuning and 2026 Industry Standards
To achieve optimal performance in 2026, you must tune the Undertow (web server) and the Jakarta EE thread pools.
Virtual Threads Configuration
One of the most significant updates in WildFly 35 is the ability to leverage Java's virtual threads. In the ee subsystem of your configuration, you can now specify a managed executor service that uses a virtual thread task factory. This allows your application to handle tens of thousands of concurrent connections with minimal memory overhead, effectively making traditional thread pool tuning obsolete for many I/O-bound use cases.
Memory Management for JDK 25
When running on JDK 25, utilize the Generational Z Garbage Collector (ZGC). This can be enabled by adding the following JVM flags to standalone.conf: -XX:+UseZGC -XX:+ZGenerational. This configuration ensures sub-millisecond pause times, which is vital for real-time enterprise applications and high-frequency trading platforms often built on Jakarta EE.
Pros and Cons of Using WildFly 35 in 2026
Evaluating the platform requires a balanced look at its operational realities.
| Feature Category | Pros | Cons |
|---|---|---|
| Performance | Extremely fast startup times and low memory overhead via Galleon trimming. | Can be resource-heavy if the "Full" distribution is used without optimization. |
| Standards Compliance | 100% Jakarta EE 11 certified; excellent MicroProfile 7.0 support. | Strict adherence to standards can make integration with non-compliant legacy libs difficult. |
| Tooling | Robust CLI, Management Console, and excellent IDE integration (IntelliJ/VS Code). | The CLI has a steep learning curve for administrators used to GUI-only tools. |
| Cloud Native | Native support for Helm charts, Kubernetes operators, and bootable JARs. | Complexity in managing "Domain Mode" in highly dynamic container environments. |
Troubleshooting Common WildFly Issues
- ModuleNotFoundException: This usually occurs when a deployment depends on a library not present in the WildFly modules. Ensure your jboss-deployment-structure.xml explicitly defines dependencies on internal server modules.
- WFLYCTL0013: Operation failed: This generic management error often points to a syntax error in your CLI command or a port conflict. Check the server.log for the specific stack trace.
- Deployment Timeout: For very large applications, the default deployment timeout of 60 seconds may be insufficient. Increase this in the system-properties section using jboss.as.management.blocking.timeout.
Frequently Asked Questions
Does WildFly 35 support Java EE 8 applications?
Yes, WildFly 35 provides a compatibility layer, but it is highly recommended to migrate to Jakarta EE 11. Applications using the older javax.* namespace must be processed through the Eclipse Transformer tool during the build phase to run on WildFly 35, as the server natively operates on the jakarta.* namespace.
How do I enable SSL/TLS 1.3 on WildFly in 2026?
SSL is managed through the Elytron security subsystem. You must create a key-store, a key-manager, and a server-ssl-context within the Elytron configuration. Then, reference this context in the Undertow subsystem's https-listener. By 2026, TLS 1.2 is considered legacy, and WildFly 35 defaults to TLS 1.3 for all new security realms.
What is the difference between Standalone and Domain mode?
Standalone mode is for single-server instances where each server has its own configuration file. Domain mode allows you to manage multiple WildFly instances (servers) from a single "Domain Controller," ensuring configuration consistency across a cluster. For 2026 cloud-native deployments, Standalone mode combined with Kubernetes Orchestration is the preferred architecture.
Can I run WildFly on ARM64 architecture?
Absolutely. In 2026, WildFly is fully optimized for ARM64 (e.g., AWS Graviton 4 or Apple M-series chips). The modular architecture and the efficiency of JDK 25 make WildFly one of the most energy-efficient application servers for ARM-based data centers.
How do I integrate MicroProfile with my Jakarta EE application on WildFly?
WildFly 35 includes the MicroProfile 7.0 platform. You can use MicroProfile Config, Health, Metrics, and Fault Tolerance alongside your Jakarta EE beans. Simply include the MicroProfile dependencies in your Maven project and WildFly will automatically provide the implementations at runtime.
The journey of mastering WildFly in 2026 requires a shift from traditional heavy-server mentalities to a modular, cloud-centric approach. By leveraging Jakarta EE 11, JDK 25, and the refined management capabilities of WildFly 35, you can build enterprise systems that are not only robust and secure but also significantly more performant than those of the previous decade. Start by migrating your development environment today to stay ahead in the evolving Java ecosystem.