X

Break New Ground

Your Own Way - Oracle JDBC drivers 19.7.0.0 on Maven Central

Kuassi Mensah
Director Product Management

 

Get The JDBC Artifacts Your Own Way

The core Oracle JDBC drivers jar i.e., ojdbc8.jar can be used in isolation however, depending on the use cases such as connection pooling, high availability, connectivity to database cloud services, NLS, and so on, additional jars are required. Figuring out which artifacts are needed for such-and-such use case, could be mind boggling.
In the previous packaging of our drivers on Maven Central, we’ve pre-established dependencies between the artifacts required for the most common use cases. Java developers familiar with Maven have been excluding the un-wanted artifacts however, some of you told us that you’d prefer to pick and choose what you need and not go through the exclusion process.

In this release, and going forward, we are giving you a choice between “pick-and-choose” and “pre-established” dependencies. There is no change in our Maven coordinates.

Picking and Choosing The JDBC Artifacts

Starting with this release (19.7.0.0), each artifact is completely independent and does not drag any other. What is the list and purpose of the 19.7.0.0 artifacts on Maven Central?

The Bill of Material (BOM)

The complete list of all artifacts, as of the 19.7.0.0 release.

Here is a summary description of each artifact (description also available in its corresponding pom.xml).

1) The core artifacts, only one at a time, cannot be mixed, are: ojdbc8, ojdbc8_g, ojdbc8dms, ojdbc8dms_g, ojdbc10, ojdbc10_g, ojdbc10dms and ojdbc10dms_g

  • ojdbc8: the core diver jar, optimized for production, no extra instrumentation; it supports the JDBC 4.2 Spec and for use with JDK 8, JDK 9, and JDK 11
  • ojdbc10: the core driver jar, optimized for production, no extra instrumentation; it supports the JDBC Spec 4.3 and for use with JDK 10 and JDK 11
  • ojdbc8dms: is ojdbc8 with Dynamic Monitoring Service instrumentation
  • ojdbc10dms: is ojdbc10 with Dynamic Monitoring Service instrumentation
  • ojdbc8_g: is ojdbc8 with debug instrumentation; for dev and test
  • ojdbc10_g: is ojdbc10 with debug instrumentation for dev and test
  • ojdbc8dms_g: is ojdbc8dms with debug instrumentation for dev and test
  • ojdbd10dms_g: is ojdbc10dms with debug instrumentation for dev and test

2) The companion artifacts, may be used with any of the core artifacts, are: ucp, oraclepki, osdt_core, osdt_cert, ons, simplefan, xdb, xmlparserv2, orai18n and dms

  • ucp: the Java Universal Connection Pool for Oracle & non-Oracle DBs
  • simplefan: Simple Fast Application Notification (FAN) library
  • ons: the Oracle Notification System library for use for FAN events
  • dms: the Oracle Dynamic Monitoring System (i.e., observability) library
  • oraclepki: the Oracle PKI provider used for Oracle wallets
  • osdt_cert: for the certificate management components used for Oracle wallets
  • osdt_core: the core components for use with osdt_cert
  • xdb: Support for the JDBC 4.x standard java.sql.SQLXML interface
  • xmlparserv2: The Oracle Database XML Parser library
  • orai18n: Java classes for NLS or Internalization support

In your project pom.xml, you can pull the corresponding jar(s) by configuring  <dependencyManagement> and a <dependencies> blocks as illustrated in the following Gist file.

The "DIY using the BOM" tab of the developers guide to Oracle JDBC with Maven has a set of use case based recipes that you can copy/paste.

Using The Pre-established Dependencies

For those who just want the required artifacts for all database use cases, we have provisioned a set of pre-defined dependencies for production, production with observability instrumentation, debugging, and debugging with observability instrumentation.

The following artifactIds pull all the jars you would need for all Oracle database use cases:
ojdbc8-production, ojdbc8-debug, ojdbc8-observability, ojdbc8-observability-debug: these artifactIds support the JDBC 4.2 Spec for use with JDK 8, 9, and 11.

ojdbc10-production, ojdbc10-debug, ojdbc10-observability, ojdbc10-observability-debug: these artifactIds support the JDBC 4.3 for use with JDK 10 and 11.

Example: I want to pull the production jars

  • the ojdbc8-production artifactId will pull ojdbc8.jar, ucp.jar, oraclepki.jar, osdt_core.jar, osdt_cert.jar, ons.jar, simplefan.jar, xdb.jar, orai18n.jar and xmlparserv2.jar
  • the ojdbc10-production artifactId will pull ojdbc10.jar, ucp.jar, oraclepki.jar, osdt_core.jar, osdt_cert.jar, ons.jar, simplefan.jar, xdb.jar, orai18n.jar and xmlparserv2.jar

All you need is to add the following dependency to your project’s pom.xml under the <dependencies> block

The "Pre-established Dependencies" tab of the developer guide for Oracle JDBC with Maven has examples of the dependencies to use for pulling the production jars (see the example above), the production jars with observability instrumentation, the debugging jars, and the debug jars with observability instrumentation.

Watch this space

As we introduce new capabilities into the drivers and companion jars, we will be announcing these through @kmensah.

Be the first to comment

Comments ( 0 )
Please enter your name.Please provide a valid email address.Please enter a comment.CAPTCHA challenge response provided was incorrect. Please try again.