org.jcreme.sql
Class SQLExceptionHandlerOracle

java.lang.Object
  extended byorg.jcreme.sql.DefaultSQLExceptionHandler
      extended byorg.jcreme.sql.SQLExceptionHandlerOracle
All Implemented Interfaces:
SQLExceptionHandler

public class SQLExceptionHandlerOracle
extends DefaultSQLExceptionHandler
implements SQLExceptionHandler

This SQLExceptionHandler is specific to Oracle. It takes advantage of the vendor codes to determine the type of the exceptions.

Version:
$Revision: 1.1 $
Author:
$Author: dbregeon $

Field Summary
static int ORACLE_CONNECTION_LOST_ERROR_CODE
          As specified in the Oracle documentation.
static int ORACLE_CONNECTION_RESET_BY_PEER_CODE
          As specified in the Oracle documentation.
static int ORACLE_DEADLOCK
          As specified in the Oracle documentation.
static int ORACLE_IMMEDIATE_SHUTDOWN_IN_PROGRESS
          As specified in the Oracle documentation.
static int ORACLE_NOT_AVAILABLE
          As specified in the Oracle documentation.
 
Fields inherited from class org.jcreme.sql.DefaultSQLExceptionHandler
SQL92_CONNECTION_ERROR_SQLSTATE_CLASS, SQL92_SERIALIZATION_FAILURE
 
Fields inherited from interface org.jcreme.sql.SQLExceptionHandler
EXCEPTION_TYPE_LOSS_OF_CONNECTION, EXCEPTION_TYPE_PLAIN_DEADLOCK, EXCEPTION_TYPE_ROLLEDBACK_DEADLOCK, EXCEPTION_TYPE_UNKNOWN, WAS_HANDLED
 
Constructor Summary
SQLExceptionHandlerOracle()
           
 
Method Summary
static SQLExceptionHandlerOracle getInstance()
          Gives access to the unique instance of the class.
 boolean isLossOfConnection(java.sql.SQLException e)
          This method can be used to test an SQLException.
 boolean isRolledBackDeadLock(java.sql.SQLException e)
          This method can be used to test an SQLException.
 
Methods inherited from class org.jcreme.sql.DefaultSQLExceptionHandler
getDeadlockTimeout, getNumberOfTries, handleConnectionClosed, handleException, handleException, handleException, handlePlainDeadLock, handleRolledBackDeadLock, isDeadLock, isLossOfConnection, isPlainDeadLock, isPlainDeadLock, isRolledBackDeadLock, isUnknown, setDeadlockTimeout, setNumberOfTries, wasHandled
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.jcreme.sql.SQLExceptionHandler
getDeadlockTimeout, getNumberOfTries, handleException, handleException, handleException, isDeadLock, isLossOfConnection, isPlainDeadLock, isPlainDeadLock, isRolledBackDeadLock, isUnknown, setDeadlockTimeout, setNumberOfTries, wasHandled
 

Field Detail

ORACLE_NOT_AVAILABLE

public static final int ORACLE_NOT_AVAILABLE
As specified in the Oracle documentation.

See Also:
Constant Field Values

ORACLE_IMMEDIATE_SHUTDOWN_IN_PROGRESS

public static final int ORACLE_IMMEDIATE_SHUTDOWN_IN_PROGRESS
As specified in the Oracle documentation.

See Also:
Constant Field Values

ORACLE_CONNECTION_RESET_BY_PEER_CODE

public static final int ORACLE_CONNECTION_RESET_BY_PEER_CODE
As specified in the Oracle documentation.

See Also:
Constant Field Values

ORACLE_CONNECTION_LOST_ERROR_CODE

public static final int ORACLE_CONNECTION_LOST_ERROR_CODE
As specified in the Oracle documentation.

See Also:
Constant Field Values

ORACLE_DEADLOCK

public static final int ORACLE_DEADLOCK
As specified in the Oracle documentation.

See Also:
Constant Field Values
Constructor Detail

SQLExceptionHandlerOracle

public SQLExceptionHandlerOracle()
Method Detail

getInstance

public static SQLExceptionHandlerOracle getInstance()
Gives access to the unique instance of the class.

Returns:
the unique instance of the class.

isLossOfConnection

public boolean isLossOfConnection(java.sql.SQLException e)
This method can be used to test an SQLException.

Specified by:
isLossOfConnection in interface SQLExceptionHandler
Overrides:
isLossOfConnection in class DefaultSQLExceptionHandler
Parameters:
e - an SQLException to test.
Returns:
true if the exception is a loss of connection, false otherwise.

isRolledBackDeadLock

public boolean isRolledBackDeadLock(java.sql.SQLException e)
This method can be used to test an SQLException.

Specified by:
isRolledBackDeadLock in interface SQLExceptionHandler
Overrides:
isRolledBackDeadLock in class DefaultSQLExceptionHandler
Parameters:
e - an SQLException to test.
Returns:
true if the exception is a deadlock and the transaction was rolled back, false otherwise.


Copyright 2006 null. All Rights Reserved.