Difference between Oracle jdbc driver classes?
I'm using Oracle's ojdbc5.jar
and noticed that it includes two JDBC driver classes.
What is the difference between oracle.jdbc.driver.OracleDri开发者_Python百科ver
vs. oracle.jdbc.OracleDriver
?
Which one should I use in my Java project?
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
Oracle Documentation
"Your code should use the package oracle.jdbc instead of the package oracle.jdbc.driver used in earlier versions of Oracle. Use of the package oracle.jdbc.driver is now deprecated, but will continue to be supported for backwards compatibility."
精彩评论