Preparing a non JDBC-4 compliant driver

In this recipe, we will learn how to make a JDBC driver compliant to version 4. This is needed to install the driver and to make it available for your datasources, and hence to your applications.

Getting ready

If you already have a JDBC 4 compliant driver, you can skip this recipe; otherwise, I assume that you do not have a JDBC driver and I'll refer to it as non-jdbc-4-driver.jar, throughout the recipe.

How to do it…

To make your driver JDBC 4 compliant, you just need to add a file into it, as described in the following steps:

  1. Create a temporary folder and navigate into it.
  2. Place your non-jdbc-4-driver.jar driver file into it.
  3. Create a META-INF/services directory.
  4. Create a file named java.sql.Driver and place it ...

Get WildFly Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.