HHH-3159 replace deprecated package 'oracle.jdbc.driver' with 'oracle.driver'
git-svn-id: https://svn.jboss.org/repos/hibernate/core/branches/Branch_3_2@15822 1b8cb986-b30d-0410-93ca-fae66ebed9b2
This commit is contained in:
parent
b3eba449ff
commit
be72cd0f28
|
@ -9,7 +9,9 @@ import org.hibernate.sql.ANSIJoinFragment;
|
|||
* 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 @@ public class Oracle10gDialect extends Oracle9iDialect {
|
|||
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";
|
||||
}
|
||||
}
|
|
@ -360,12 +360,16 @@ public class Oracle8iDialect extends Dialect {
|
|||
|
||||
};
|
||||
|
||||
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);
|
||||
|
|
Loading…
Reference in New Issue