JDBC Driver Types

Describes the three types of JDBC connections
In this section, we discuss the three types of JDBC drivers and how to make connections with each.
JDBC Type 2
A JDBC Type 2 driver is known as a JDBC Native API driver. The Datacom Server native API is provided on Windows and USS. It is installed using SMP/E on USS and using a Windows installer on Windows. Since the CCI client is available on both Windows and USS, the application can use either communication protocol - CCI or TCP.
The Datacom Server Type 2 driver connection URL is:
jdbc:datacom:/ServerName=<SERVERNAME>,ApplicationID=<APPLID>,ConnectType=<TCP/CCI>,SystemID=<CCI SYSID>,HostName=<TCPIP_HOST>,HostPort=<TCPIP_PORT or CCI Port>
UserID= and Password= can also be coded.
ServerName=, ApplicationID=, ConnectType=, HostName=, HostPort= and SystemID= are required.
SystemID is ignored when ConnectType=TCP but must be coded in the URL.
UserID= and Password= can also be coded.
There is no //<host>:<port> which denotes a "proxy-type" connection which is Type 3 and Type 4 in Datacom Server terms.
JDBC Type 3
A JDBC Type 3 driver uses a network or middleware tier. For Datacom Server, the middle tier is a Datacom Server Proxy that can deployed on USS or Windows. It is a process that runs stand-alone and separate from the Server MF address space. It is called a process because in zOS it runs under USS rather than a zOS address space or region. Same goes for Windows processes. Since the CCI client is available on USS and Windows, CCI can be used as the communication protocol.
The Datacom Server Type 3 driver connection URL is:
jdbc:datacom:
//<proxy_name or ip address>:<proxy_port>/
ServerName
=<SERVERNAME>,
ApplicationID=
<APPLID>,
ConnectType
=<TCP/CCI>,
SystemID
=<CCI SYSID>,
HostName
=<TCPIP_HOST>,
HostPort
=<TCPIP_PORT or CCI Port>
UserID= and Password= can also be coded.
ServerName=, ApplicationID=, ConnectType=, HostName=, HostPort= and SystemID= are required.
SystemID is ignored when ConnectType=TCP but still must be coded in the URL.
The proxy_name and proxy_port refer to the DNS name or IP address of the Proxy and it's listener port. Since the Proxy is separate from the Server MF instance, it will be different from HostName and HostPort. HostName and HostPort refer to the LPAR of the Server and CCI regions (these are separate address spaces). HostPort is the Server listener port if ConnectType=TCP. Or, the CCI listener port (1202, by default) if ConnectType=CCI.
JDBC Type 4
A JDBC Type 4 driver is a direct connection to a DBMS. For Datacom, the Type 4 driver is a direct connection to the Datacom Server MF address space and uses TCP as the communication protocol. In other words, Datacom Server MF uses TCP to communicate directly to the JDBC application. This is especially useful for applications that are deployed on Linux, Unix, or some other non-Windows platform. The CCI client is not supported in Linux-type platforms. Therefore, the only way to connect to Datacom Server directly from a Linux-type platform is through a Type 4 connection. The Datacom Server Type 4 connection is TCP only.
The Datacom Server Type 4 driver connection URL is:
jdbc:datacom:
//<hostname or ip address>:<TCPIP_PORT>/
ServerName
=<SERVERNAME>
A UserID= and Password= can also be coded in the URL. All other parameters are ignored or not used.
The port number is the TCPIP_PORT listener port which is coded in the Server MF startup options.
Recommendations for choosing your JDBC Driver Type
Non-Windows Platforms
A JDBC application that is targeted for non-Windows or Linux-type platforms can use a JDBC Type 3 or Type 4 connection. If the Linux platform resides behind a corporate firewall and there is no need for encryption, the Type 4 connection is recommended. It is simpler requiring only the cadcjdbc.jar file on the Linux-type client and a single address space (Datacom Server) on the mainframe side.
If the application requires encryption, then a Type 3 connection and CCI is required. You must install CA-ENF (required for CCI) and CA-CCI on the mainframe side. A Type 3 connection also requires a Datacom Server Proxy on USS or Windows. Therefore, Datacom Server and CCI must be installed and deployed on Windows or USS. In other words, it adds a level of difficulty and more administrative tasks but is certainly as viable an option as Type 2 or Type 4.
If the application is targeted to run on zOS platforms under USS, a Type 2 connection using CACCI on USS is probably the most efficient way to connect. Type 4 using TCP is also an option, but CCI is more efficient and faster but does require CA-ENF, CACCI, and so on.
Windows Platform
An application that is targeted to run on Windows can use a Type 2, Type 3, or Type 4 connection.