Author: cbredesen
Date: 2009-01-26 15:32:36 -0500 (Mon, 26 Jan 2009)
New Revision: 15822
Modified:
core/branches/Branch_3_2/src/org/hibernate/dialect/Oracle10gDialect.java
core/branches/Branch_3_2/src/org/hibernate/dialect/Oracle8iDialect.java
Log:
HHH-3159 replace deprecated package 'oracle.jdbc.driver' with
'oracle.driver'
Modified: core/branches/Branch_3_2/src/org/hibernate/dialect/Oracle10gDialect.java
===================================================================
--- core/branches/Branch_3_2/src/org/hibernate/dialect/Oracle10gDialect.java 2009-01-26
20:31:11 UTC (rev 15821)
+++ core/branches/Branch_3_2/src/org/hibernate/dialect/Oracle10gDialect.java 2009-01-26
20:32:36 UTC (rev 15822)
@@ -9,7 +9,9 @@
* A dialect specifically for use with Oracle 10g.
* <p/>
* The main difference between this dialect and {@link Oracle9iDialect}
- * is the use of "ANSI join syntax" here...
+ * is the use of "ANSI join syntax". This dialect also retires the use
+ * of the <tt>oracle.jdbc.driver</tt> package in favor of
+ * <tt>oracle.jdbc</tt>.
*
* @author Steve Ebersole
*/
@@ -23,4 +25,12 @@
return new ANSIJoinFragment();
}
+ /*
+ * The package "oracle.jdbc.driver" was retired in 9.0.1 but works fine up
+ * through 10g. So as not to mess with 9i, we're changing it in 10g -- we
+ * may not need an 11g Dialect at all.
+ */
+ String getOracleTypesClassName() {
+ return "oracle.jdbc.OracleTypes";
+ }
}
\ No newline at end of file
Modified: core/branches/Branch_3_2/src/org/hibernate/dialect/Oracle8iDialect.java
===================================================================
--- core/branches/Branch_3_2/src/org/hibernate/dialect/Oracle8iDialect.java 2009-01-26
20:31:11 UTC (rev 15821)
+++ core/branches/Branch_3_2/src/org/hibernate/dialect/Oracle8iDialect.java 2009-01-26
20:32:36 UTC (rev 15822)
@@ -359,13 +359,17 @@
}
};
+
+ String getOracleTypesClassName() {
+ return "oracle.jdbc.driver.OracleTypes";
+ }
// not final-static to avoid possible classcast exceptions if using different oracle
drivers.
int oracletypes_cursor_value = 0;
public int registerResultSetOutParameter(java.sql.CallableStatement statement,int col)
throws SQLException {
if(oracletypes_cursor_value==0) {
try {
- Class types =
ReflectHelper.classForName("oracle.jdbc.driver.OracleTypes");
+ Class types = ReflectHelper.classForName(getOracleTypesClassName());
oracletypes_cursor_value =
types.getField("CURSOR").getInt(types.newInstance());
} catch (Exception se) {
throw new HibernateException("Problem while trying to load or access
OracleTypes.CURSOR value",se);
Show replies by thread