com.sleepycat.je
Class DeadlockException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by java.lang.RuntimeException
              extended by com.sleepycat.je.DatabaseException
                  extended by com.sleepycat.je.OperationFailureException
                      extended by com.sleepycat.je.LockConflictException
                          extended by com.sleepycat.je.DeadlockException
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
LockNotGrantedException

Deprecated. temporarily until true deadlock detection is implemented. Presently, {code DeadlockException} is replaced by LockConflictException as the common base class for lock conflict exceptions.

public class DeadlockException
extends LockConflictException

Thrown when a lock or transaction timeout occurs and EnvironmentConfig.LOCK_OLD_LOCK_EXCEPTIONS is set to true.

Currently (unless EnvironmentConfig.LOCK_OLD_LOCK_EXCEPTIONS is set to true, see below) DeadlockException is not thrown by JE because true deadlock detection is not used in JE. Currently, lock timeouts are used instead, and a deadlock will cause a LockTimeoutException. When true deadlock detection is added to JE in the future, DeadlockException will be thrown instead of LockTimeoutException when a true deadlock occurs.

For compatibility with JE 3.3 and earlier, DeadlockException is thrown instead of LockTimeoutException and TransactionTimeoutException when EnvironmentConfig.LOCK_OLD_LOCK_EXCEPTIONS is set to true. This configuration parameter is false by default. See EnvironmentConfig.LOCK_OLD_LOCK_EXCEPTIONS for information on the changes that should be made to all applications that upgrade from JE 3.3 or earlier.

Normally, applications should catch the base class LockConflictException rather than catching one of its subclasses. All lock conflicts are typically handled in the same way, which is normally to abort and retry the transaction. See LockConflictException for more information.

The Transaction handle is invalidated as a result of this exception.

See Also:
Serialized Form

Constructor Summary
DeadlockException(Locker locker, String message)
          Deprecated. For internal use only.
DeadlockException(String message)
          Deprecated. For internal use only.
DeadlockException(String message, DeadlockException cause)
          Deprecated. For internal use only.
 
Method Summary
 OperationFailureException wrapSelf(String msg)
          Deprecated. For internal use only.
 
Methods inherited from class com.sleepycat.je.LockConflictException
getOwnerTxnIds, getTimeoutMillis, getWaiterTxnIds, setOwnerTxnIds, setTimeoutMillis, setWaiterTxnIds
 
Methods inherited from class com.sleepycat.je.DatabaseException
addErrorMessage, getMessage, getVersionHeader
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DeadlockException

DeadlockException(String message)
Deprecated. 
For internal use only.


DeadlockException

public DeadlockException(Locker locker,
                         String message)
Deprecated. 
For internal use only.


DeadlockException

DeadlockException(String message,
                  DeadlockException cause)
Deprecated. 
For internal use only.

Method Detail

wrapSelf

public OperationFailureException wrapSelf(String msg)
Deprecated. 
For internal use only.

Specified by:
wrapSelf in class OperationFailureException


Copyright (c) 2004-2010 Oracle. All rights reserved.