Configuring a datasource with PostgreSQL and JBoss/WildFly

This tech tip shows how you can install and configure PostgreSQL with JBoss / WildFly going into the details of PostGreSQL installation, configuration and tuning.  We will also learn how to configure hibernate postgresql dialect in a JPA application. Installing PostgreSQL We will assume that you are running on a Linux machine. Firstly, install PostgreSQL: Next, … Read more

How to customize WildFly using Env variables

In this article, we will learn how to leverage environment variables to modify and optimize WildFly configurations. We will explore first how to pass environment variables to a basic WildFly configuration. Then, in the next article we will show a common use case for this feature which is Cloud provisioning of WildFly. Passing environment variables … Read more

How to disable WildFly Admin Console

The WildFly application server comes with a powerful Admin Console that provides a user-friendly interface for managing and monitoring server resources. However, in some scenarios, you may want to disable the Admin Console to enhance security. This tutorial guides you through the process of disabling the Admin Console in WildFly or JBoss Enterprise Application Platform (JBoss EAP).

Read more

JBoss vs Tomcat: A Comprehensive Comparison

Apache Tomcat and WildFly (formerly known as JBoss Application Server) are both popular open-source Java-based application servers, but they have differences in terms of features, architecture, and the development communities around them. Let’s dig into a comparison between Apache Tomcat and WildFly. Overview of JBoss vs Tomcat Apache Tomcat and WildFly are both popular open-source … Read more

Using try-with-resources to close database connections

Managing database connections is a crucial aspect of Java programming, especially when working with relational databases. Java provides a convenient way to handle resources, including database connections, using the try-with-resources statement introduced in Java 7. This feature simplifies resource management by automatically closing resources when they are no longer needed, reducing the risk of resource … Read more

Creating a new subsystem in WildFly made simple

In this tutorial we will learn how to extend WildFly by adding a new subsystem. Although this operation involves several steps, by using the Maven wildfly-subsystem archetype you will get soon up to speed. . Below, I’ve outlined all the steps in a basic tutorial to get you started. Note that this tutorial assumes you have some familiarity with Java and WildFly administration.

Read more

How to solve java.lang.NoSuchFieldError: EMPTY_BYTE_ARRAY

When deploying applications on WildFly, encountering a log4j2 core libs and log4j2 API mismatch issue is not uncommon. This issue, presented as java.lang.NoSuchFieldError: EMPTY_BYTE_ARRAY, arises due to discrepancies between the Log4j2 core libraries used within the application and the Log4j2 API provided by WildFly’s modules. Cause: Firstly, the mismatch occurs when the application uses a … Read more