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

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

allowPublicKeyRetrieval option in the MySQL JDBC connector

The allowPublicKeyRetrieval option in the MySQL JDBC connector is used to control whether the client is allowed to request the public key of the server during an SSL connection. By default, this option is set to false to enhance security and prevent potential man-in-the-middle attacks. However, in some cases, it may be necessary to set this option to true to enable certain features or compatibility with older applications.

Read more

WildFly deployable datasources

In this tutorial, we’ll walk through the process of deploying a WildFly datasource XML file as part of your Java EE application. WildFly, formerly known as JBoss AS (Application Server), is a popular open-source application server developed by Red Hat. A datasource XML file contains configuration details for database connections, such as database URL, username, password, and driver class.

Read more

How to solve the issue JDBCConnectionException: could not extract ResultSet

The JDBCConnectionException with the message “could not extract ResultSet” is a common exception encountered in Java applications that interact with databases. This article aims to explore the possible root causes of this exception and provide troubleshooting steps to help you resolve the issue. Root Causes of JDBCConnectionException: Could Not Extract ResultSet Troubleshooting Steps Conclusion The … Read more