Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Which JDBC driver type should I use for accessing an Oracle Database?

We're running a J2EE Application inside a Tomcat WebServer on AIX.

We need to access a few Views and Stored Procedures of an Oracle Database. This oracle datebase is not the one our application is based on, but an external system we have to communicate with.

As far as I can tell from now, we are going to get around a 1000 SELECTs per minute on high load and a few stored procedure calls per hour, if any.

Which JDBC driver type would be the best to use in this situation?

As far as I have gathered type 4 seems to be the way to go, but I haven't been able to find a definite statement about this by Oracle or some other reliable source.

like image 563
Maximilian Avatar asked Dec 28 '22 02:12

Maximilian


1 Answers

The Type 4 ("thin") driver is the recommended driver by Oracle.

The only reason to use the OCI ("thick") driver is when you need the advanced features of a RAC such as transparent application failover (TAF). For everything else the thin driver is recommended.

See the JDBC Developer's Guide for details:
http://download.oracle.com/docs/cd/B28359_01/java.111/b31224/overvw.htm#BABCHIGI

The most important sentence is probably:

In general, unless you need OCI-specific features, such as support for non-TCP/IP networks, use the JDBC Thin driver.

like image 172
a_horse_with_no_name Avatar answered Jan 14 '23 14:01

a_horse_with_no_name