org.jcreme.sql
Class SQLExceptionHandlerSybase

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

public class SQLExceptionHandlerSybase
extends DefaultSQLExceptionHandler
implements SQLExceptionHandler

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

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

Field Summary
static java.lang.String SYBASE_CONNECTION_ALREADY_CLOSED_SQLSTATE
          As specified in the Sybase documentation.
static java.lang.String SYBASE_CONNECTION_LOST_SQLSTATE
          As specified in the Sybase documentation.
static java.lang.String SYBASE_IO_ERROR_SQLSTATE
          As specified in the Sybase 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
SQLExceptionHandlerSybase()
           
 
Method Summary
static SQLExceptionHandlerSybase 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.
 
Methods inherited from class org.jcreme.sql.DefaultSQLExceptionHandler
getDeadlockTimeout, getNumberOfTries, handleConnectionClosed, handleException, handleException, handleException, handlePlainDeadLock, handleRolledBackDeadLock, isDeadLock, isLossOfConnection, isPlainDeadLock, isPlainDeadLock, isRolledBackDeadLock, 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, isRolledBackDeadLock, isUnknown, setDeadlockTimeout, setNumberOfTries, wasHandled
 

Field Detail

SYBASE_CONNECTION_LOST_SQLSTATE

public static final java.lang.String SYBASE_CONNECTION_LOST_SQLSTATE
As specified in the Sybase documentation.

See Also:
Constant Field Values

SYBASE_IO_ERROR_SQLSTATE

public static final java.lang.String SYBASE_IO_ERROR_SQLSTATE
As specified in the Sybase documentation.

See Also:
Constant Field Values

SYBASE_CONNECTION_ALREADY_CLOSED_SQLSTATE

public static final java.lang.String SYBASE_CONNECTION_ALREADY_CLOSED_SQLSTATE
As specified in the Sybase documentation.

See Also:
Constant Field Values
Constructor Detail

SQLExceptionHandlerSybase

public SQLExceptionHandlerSybase()
Method Detail

getInstance

public static SQLExceptionHandlerSybase 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.


Copyright 2006 null. All Rights Reserved.