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

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

H2 Database Tutorial and expert Tips

H2 DB is an open source lightweight Database written in Java. It ships in JBoss EAP and WildFly application server to speed up developing and testing Java applications. Let’s have a look to the main configuration options and how to create an example application using the H2 DB. What is H2 database? Firstly, let’s see … Read more