org.jcreme.sql
Class DeadLockException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.sql.SQLException
org.jcreme.sql.DeadLockException
- All Implemented Interfaces:
- java.io.Serializable
- public class DeadLockException
- extends java.sql.SQLException
This class enables to precise the nature of an SQLException. When a deadlock
is detected, this class enables to report it and eventually handle it (for
instance by repeating the query a number of times).
- Version:
- $Revision: 1.1 $
- Author:
- $Author: dbregeon $
- See Also:
- Serialized Form
Fields inherited from class java.lang.Exception |
|
Constructor Summary |
DeadLockException(java.lang.String reason,
java.lang.String sqlState,
int vendorCode)
Creates a new DeadLockException. |
Method Summary |
boolean |
getWasBatchStatement()
Gives access to the wasBatchStatement flag. |
void |
setNextException(java.sql.BatchUpdateException exc)
Adds a BatchUpdateException object to the end of the chain. |
void |
setNextException(java.sql.SQLException exc)
Adds a SQLException object to the end of the chain. |
Methods inherited from class java.sql.SQLException |
getErrorCode, getNextException, getSQLState |
Methods inherited from class java.lang.Throwable |
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
DeadLockException
public DeadLockException(java.lang.String reason,
java.lang.String sqlState,
int vendorCode)
- Creates a new DeadLockException.
- Parameters:
reason
- a description of the exception.sqlState
- an XOPEN or SQL 99 code identifying the exceptionvendorCode
- a database vendor-specific exception code
setNextException
public void setNextException(java.sql.BatchUpdateException exc)
- Adds a BatchUpdateException object to the end of the chain. The flag
wasBatchStatement is also set to true.
- Parameters:
exc
- the new exception that will be added to the end of the
SQLException chain.
setNextException
public void setNextException(java.sql.SQLException exc)
- Adds a SQLException object to the end of the chain. The flag
wasBatchStatement is also set to false.
- Parameters:
exc
- the new exception that will be added to the end of the
SQLException chain.
getWasBatchStatement
public boolean getWasBatchStatement()
- Gives access to the wasBatchStatement flag.
- Returns:
- true if the statement that threw this exception was a Batch
Statement, false otherwise.
Copyright 2006 null. All Rights Reserved.