com.interface21.jdbc.core
Class SQLExceptionTranslaterFactory

java.lang.Object
  |
  +--com.interface21.jdbc.core.SQLExceptionTranslaterFactory

public class SQLExceptionTranslaterFactory
extends java.lang.Object

Factory for creating SQLExceptionTranslator based on the DatabaseProductName taken from the DatabaseMetaData. Returns a SQLExceptionTranslator populated with vendor codes defined in a configuration file named "sql-error-codes.xml".

Version:
$Id: SQLExceptionTranslaterFactory.java,v 1.6 2003/06/06 16:13:22 jhoeller Exp $
Author:
Thomas Risberg

Field Summary
protected  org.apache.commons.logging.Log logger
           
static java.lang.String SQL_ERROR_CODE_DEFAULT_PATH
           
static java.lang.String SQL_ERROR_CODE_OVERRIDE_PATH
          Name of SQL error code file, loading on the classpath.
 
Method Summary
 SQLExceptionTranslater getDefaultTranslater(javax.sql.DataSource ds)
           
 SQLErrorCodes getErrorCodes(java.lang.String dbName)
           
static SQLExceptionTranslaterFactory getInstance()
          Factory method
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

protected final org.apache.commons.logging.Log logger

SQL_ERROR_CODE_OVERRIDE_PATH

public static final java.lang.String SQL_ERROR_CODE_OVERRIDE_PATH
Name of SQL error code file, loading on the classpath. Will look in current directory (no leading /).

SQL_ERROR_CODE_DEFAULT_PATH

public static final java.lang.String SQL_ERROR_CODE_DEFAULT_PATH
Method Detail

getInstance

public static SQLExceptionTranslaterFactory getInstance()
Factory method

getDefaultTranslater

public SQLExceptionTranslater getDefaultTranslater(javax.sql.DataSource ds)

getErrorCodes

public SQLErrorCodes getErrorCodes(java.lang.String dbName)


Rod Johnson and Spring contributors 2001-2003.