416 Robust Data Synchronization with IBM Tivoli Directory Integrator
Introduction to JDBC drivers
According to the JDBC specification, there are four types of JDBC driver
architectures:
Type 1 - Drivers that implement the JDBC API as a mapping to another data
access API, such as Open Database Connectivity (ODBC). Drivers of this type
are generally dependent on a native library, which limits their portability. The
JDBC-ODBC Bridge driver is an example of a Type 1 driver.
Type 2 - Drivers that are written partly in the Java programming language and
partly in native code. The drivers use a native client library specific to the data
source to which they connect. Again, because of the native code, their portability
is limited.
Type 3 - Drivers that use a pure Java client and communicate with a middleware
server using a database-independent protocol. The middleware server then
communicates the client's requests to the data source.
Type 4 - Drivers that are pure Java and implement the network protocol for a
specific data source. The client connects directly to the data source.
Database connectivity to Oracle
Based on the JDBC driver architecture the following types of drivers are available
from Oracle.
1. Oracle JDBC Type 1
This is an Oracle ODBC (not JDBC) driver, that you connect to using a
JDBC-ODBC bridge driver. Oracle does supply an ODBC driver, but does not
supply a bridge driver. Instead, you can get one of these JDBC-ODBC bridge
drivers from http://java.sun.com/products/jdbc/drivers.html. This
configuration works fine, but a JDBC Type 2 or Type 4 driver will offer more
features and will be faster.
2. Oracle JDBC Type 2
There are two flavors of the Type 2 driver.
JDBC OCI client-side driver
This driver uses Java native methods to call entrypoints in an underlying C
library. That C library, called OCI (Oracle Call Interface), interacts with an
Note: We only use Type 4 drivers with Tivoli Directory Integrator, but will
discuss other types as well for a better understanding.
Appendix A. Tricky connections 417
Oracle database. The JDBC OCI driver requires an Oracle client
installation of the same version as the driver. The use of native methods
makes the JDBC OCI driver platform specific. Oracle supports Solaris,
Windows, and many other platforms. This means that the Oracle JDBC
OCI driver is not appropriate for Java applets, because it depends on a C
library. Starting from Version 10.1.0, the JDBC OCI driver is available for
installation with the OCI Instant Client feature, which does not require a
complete Oracle client-installation. Please refer to the Oracle Call
Interface for more information.
JDBC Server-Side Internal driver
This driver uses Java native methods to call entrypoints in an underlying C
library. That C library is part of the Oracle server process and
communicates directly with the internal SQL engine inside Oracle. The
driver accesses the SQL engine by using internal function calls and thus
avoiding any network traffic. This allows your Java code to run on the
server to access the underlying database in the fastest possible manner. It
can only be used to access the same database.
3. Oracle JDBC Type4
Again, there are two flavors of the Type 4 driver.
JDBC Thin client-side driver
This driver uses Java to connect directly to Oracle. It implements Oracle's
SQL*Net Net8 and TTC adapters using its own TCP/IP based Java socket
implementation. The JDBC Thin client-side driver does not require Oracle
client software to be installed, but does require the server to be configured
with a TCP/IP listener. Because it is written entirely in Java, this driver is
platform-independent. The JDBC Thin client-side driver can be
downloaded into any browser as part of a Java application. (Note that if
running in a client browser, that browser must allow the applet to open a
Java socket connection back to the server.)
JDBC Thin server-side driver
This driver uses Java to connect directly to Oracle. This driver is used
internally within the Oracle database. This driver offers the same
functionality as the JDBC Thin client-side driver, but runs inside an Oracle
database and is used to access remote databases. Because it is written
entirely in Java, this driver is platform-independent. There is no difference
in your code between using the Thin driver from a client application or from
inside a server.

Get Robust Data Synchronization with IBM Tivoli Directory Integrator 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.