Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Difference between Oracle jdbc driver classes?

Tags:

java

oracle

jdbc

I'm using Oracle's ojdbc5.jar and noticed that it includes two JDBC driver classes.

What is the difference between oracle.jdbc.driver.OracleDriver vs. oracle.jdbc.OracleDriver?

Which one should I use in my Java project?

like image 924
bw_üezi Avatar asked Jun 01 '11 14:06

bw_üezi


People also ask

Which Oracle JDBC driver should I use?

Which driver should I use? The best choice is to use Oracle JDBC thin driver. All the new enhancements and features are implemented only on JDBC Thin driver. If you are using a non-TCP/IP network you must use the OCI driver.

How many categories of JDBC drivers are there Oracle?

Four types of JDBC drivers are available. Oracle JD Edwards EnterpriseOne supports Type 3 and Type 4 JDBC drivers. Type 1 JDBC drivers translate JDBC calls into ODBC calls. Type 1 JDBC drivers are usually called JDBC-ODBC bridge drivers.


1 Answers

For Oracle 9i onwards you should use oracle.jdbc.OracleDriver rather than oracle.jdbc.driver.OracleDriver as Oracle have stated that oracle.jdbc.driver.OracleDriver is deprecated and support for this driver class will be discontinued in the next major release.

-- http://tomcat.apache.org/tomcat-5.5-doc/jndi-datasource-examples-howto.html#Oracle_8i,9i&_10g

like image 125
Asaph Avatar answered Sep 30 '22 15:09

Asaph