Chapter 2. Supported drivers for JDBC and SQLJ
The DB2 product includes support for two types of JDBC driver architecture.
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 DB2 database
system does not support 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. Because of the native code, their portability is limited.
Type 3
Drivers that use a pure Java client and communicate with a database using a
database-independent protocol. The database then communicates the client’s
requests to the data source. The DB2 database system does not support a type
3 driver.
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.
DB2 for z/OS supports the IBM Data Server Driver for JDBC and SQLJ, which
combines type 2 and type 4 JDBC implementations. The driver is packaged in the
following way:
v db2jcc.jar and sqlj.zip for JDBC 3.0 and earlier support
v db2jcc4.jar and sqlj4.zip for JDBC 4.0 and later, and JDBC 3.0 and earlier support
You control the level of JDBC support that you want by specifying the appropriate
set of files in the CLASSPATH.
IBM Data Server Driver for JDBC and SQLJ (type 2 and type 4)
The IBM Data Server Driver for JDBC and SQLJ is a single driver that includes
JDBC type 2 and JDBC type 4 behavior. When an application loads the IBM Data
Server Driver for JDBC and SQLJ, a single driver instance is loaded for type 2 and
type 4 implementations. The application can make type 2 and type 4 connections
using this single driver instance. The type 2 and type 4 connections can be made
concurrently. IBM Data Server Driver for JDBC and SQLJ type 2 driver behavior is
referred to as IBM Data Server Driver for JDBC and SQLJ type 2 connectivity. IBM
Data Server Driver for JDBC and SQLJ type 4 driver behavior is referred to as IBM
Data Server Driver for JDBC and SQLJ type 4 connectivity.
Two versions of the IBM Data Server Driver for JDBC and SQLJ are available. IBM
Data Server Driver for JDBC and SQLJ version 3.5x is JDBC 3.0-compliant. IBM
Data Server Driver for JDBC and SQLJ version 4.x is JDBC 3.0-compliant and
supports some JDBC 4.0 functions.
The IBM Data Server Driver for JDBC and SQLJ supports these JDBC and SQLJ
functions:
© Copyright IBM Corp. 1998, 2008 3
|
|
|
|