diff --git a/hibernate-core/src/main/java/org/hibernate/dialect/Oracle10gDialect.java b/hibernate-core/src/main/java/org/hibernate/dialect/Oracle10gDialect.java index 70cc4c2375..9086ec00d5 100644 --- a/hibernate-core/src/main/java/org/hibernate/dialect/Oracle10gDialect.java +++ b/hibernate-core/src/main/java/org/hibernate/dialect/Oracle10gDialect.java @@ -22,8 +22,6 @@ * Boston, MA 02110-1301 USA */ package org.hibernate.dialect; -import org.hibernate.exception.internal.OracleSQLExceptionConversionDelegate; -import org.hibernate.exception.spi.SQLExceptionConversionDelegate; import org.hibernate.sql.ANSIJoinFragment; import org.hibernate.sql.JoinFragment; @@ -47,9 +45,4 @@ public class Oracle10gDialect extends Oracle9iDialect { public JoinFragment createOuterJoinFragment() { return new ANSIJoinFragment(); } - - @Override - public SQLExceptionConversionDelegate buildSQLExceptionConversionDelegate() { - return new OracleSQLExceptionConversionDelegate( this ); - } } diff --git a/hibernate-core/src/main/java/org/hibernate/exception/internal/OracleSQLExceptionConversionDelegate.java b/hibernate-core/src/main/java/org/hibernate/exception/internal/OracleSQLExceptionConversionDelegate.java deleted file mode 100644 index f97fe3a0a1..0000000000 --- a/hibernate-core/src/main/java/org/hibernate/exception/internal/OracleSQLExceptionConversionDelegate.java +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Hibernate, Relational Persistence for Idiomatic Java - * - * Copyright (c) 2012, Red Hat Inc. or third-party contributors as - * indicated by the @author tags or express copyright attribution - * statements applied by the authors. All third-party contributions are - * distributed under license by Red Hat Inc. - * - * This copyrighted material is made available to anyone wishing to use, modify, - * copy, or redistribute it subject to the terms and conditions of the GNU - * Lesser General Public License, as published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License - * for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this distribution; if not, write to: - * Free Software Foundation, Inc. - * 51 Franklin Street, Fifth Floor - * Boston, MA 02110-1301 USA - */ -package org.hibernate.exception.internal; - -import java.sql.SQLException; - -import org.hibernate.JDBCException; -import org.hibernate.PessimisticLockException; -import org.hibernate.exception.spi.AbstractSQLExceptionConversionDelegate; -import org.hibernate.exception.spi.ConversionContext; - -/** - * A {@link org.hibernate.exception.spi.SQLExceptionConversionDelegate} - * implementation specific to Oracle. - * - * @author Gail Badner - */ -public class OracleSQLExceptionConversionDelegate extends AbstractSQLExceptionConversionDelegate { - private static final int PESSIMISTIC_LOCK_ERROR_CODE = 30006; - - public OracleSQLExceptionConversionDelegate(ConversionContext conversionContext) { - super( conversionContext ); - } - - @Override - public JDBCException convert(SQLException sqlException, String message, String sql) { - if ( sqlException.getErrorCode() == PESSIMISTIC_LOCK_ERROR_CODE ) { - return new PessimisticLockException( message, sqlException, sql ); - } - else { - return null; // allow other delegates the chance to look - } - } -}