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?
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.
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.
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With