net.sourceforge.orbroker.exception
Class DefaultExceptionEvaluator

java.lang.Object
  extended bynet.sourceforge.orbroker.exception.DefaultExceptionEvaluator
All Implemented Interfaces:
ExceptionEvaluator

public class DefaultExceptionEvaluator
extends Object
implements ExceptionEvaluator

The default implementation that uses standard ISO values for SQLState for evaluation. Can be extended to override methods for more database specific evaluation.

Author:
Nils Kilden-Pedersen

Constructor Summary
DefaultExceptionEvaluator()
           
 
Method Summary
 boolean isConstraint(SQLException source)
          Is SQLException a constraint violation?
 boolean isDeadlock(SQLException source)
          Is SQLException a deadlock?
 boolean isStaleConnection(SQLException source)
          Is SQLException caused by stale connection?
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultExceptionEvaluator

public DefaultExceptionEvaluator()
Method Detail

isConstraint

public boolean isConstraint(SQLException source)
Description copied from interface: ExceptionEvaluator
Is SQLException a constraint violation?

Specified by:
isConstraint in interface ExceptionEvaluator
Parameters:
source - Exception source
Returns:
true, if SQLException is caused by a database constraint.
See Also:
ExceptionEvaluator.isConstraint(java.sql.SQLException)

isDeadlock

public boolean isDeadlock(SQLException source)
Description copied from interface: ExceptionEvaluator
Is SQLException a deadlock?

Specified by:
isDeadlock in interface ExceptionEvaluator
Parameters:
source - Exception source
Returns:
true, if SQLException is caused by a dead lock.
See Also:
ExceptionEvaluator.isDeadlock(java.sql.SQLException)

isStaleConnection

public boolean isStaleConnection(SQLException source)
Description copied from interface: ExceptionEvaluator
Is SQLException caused by stale connection?

Specified by:
isStaleConnection in interface ExceptionEvaluator
Parameters:
source - Exception source
Returns:
true, if SQLException is caused by a stale connection.
See Also:
ExceptionEvaluator.isStaleConnection(java.sql.SQLException)