How to validate Database connections in JBoss / WildFly

This tutorial discusses how to validate Datasource connections using in WildFly using proper validation methods. Besides, it will discuss how to troubleshoot database connections which are not properly replaced when Database connections are no longer valid. Connection Validation in a nutshell A datasource connection validation helps to ensure that the connections to the database are … 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