Book Image

Wildfly Cookbook

Book Image

Wildfly Cookbook

Overview of this book

Table of Contents (23 chapters)
WildFly Cookbook
Credits
About the Author
Acknowledgments
About the Reviewers
www.PacktPub.com
Preface
Index

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 into the folder specified in step 3.

  5. Edit the file java.sqlDriver and enter one line containing the fully qualified name of the class implementing the driver.

  6. Starting from the empty folder as per step 1, update the file non-jdbc-4-driver.jar using...