Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 /*
  * See the file LICENSE for redistribution information.
  *
  * Copyright (c) 2002, 2013 Oracle and/or its affiliates.  All rights reserved.
  *
  */
 
 package com.sleepycat.je;
 
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.

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 {
    private static final long serialVersionUID = 729943514L;

    
For internal use only.

Hidden:
    DeadlockException(String message) {
        super(message);
    }

    
For internal use only.

Hidden:
    public DeadlockException(Locker lockerString message) {
        super(lockermessage);
    }

    
For internal use only.

Hidden:
    DeadlockException(String message,
                      DeadlockException cause) {
        super(messagecause);
    }

    
For internal use only.

Hidden:
    @Override
    public OperationFailureException wrapSelf(String msg) {
        return new DeadlockException(msgthis);
    }
New to GrepCode? Check out our FAQ X