javax.persistence
Class LockTimeoutException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by java.lang.RuntimeException
              extended by javax.persistence.PersistenceException
                  extended by javax.persistence.LockTimeoutException
All Implemented Interfaces:
Serializable

public class LockTimeoutException
extends PersistenceException

Thrown by the persistence provider when an pessimistic locking conflict occurs that does not result in transaction rollback. This exception may be thrown as part of an API call, at, flush or at commit time. The current transaction, if one is active, will be not be marked for rollback.

Since:
JPA 2.0 version.
Author:
Florent Benoit
See Also:
JPA 2.0 specification, Serialized Form

Constructor Summary
LockTimeoutException()
          Default constructor : builds an exception with an empty message.
LockTimeoutException(Object entity)
          Build an exception with the given entity object.
LockTimeoutException(String message)
          Build an exception with the given message.
LockTimeoutException(String message, Throwable causedByThrowable)
          Builds an exception with a given message and given exception.
LockTimeoutException(String message, Throwable causedByThrowable, Object entity)
          Builds an exception with a given message and given exception.
LockTimeoutException(Throwable causedByThrowable)
          Build an exception with the given exception.
 
Method Summary
 Object getObject()
          Returns the object that caused this exception.
 
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
 

Constructor Detail

LockTimeoutException

public LockTimeoutException()
Default constructor : builds an exception with an empty message.


LockTimeoutException

public LockTimeoutException(Object entity)
Build an exception with the given entity object.

Parameters:
entity - the given entity to use.

LockTimeoutException

public LockTimeoutException(String message)
Build an exception with the given message.

Parameters:
message - the given message to use.

LockTimeoutException

public LockTimeoutException(Throwable causedByThrowable)
Build an exception with the given exception.

Parameters:
causedByThrowable - the cause of this exception.

LockTimeoutException

public LockTimeoutException(String message,
                            Throwable causedByThrowable)
Builds an exception with a given message and given exception.

Parameters:
message - the message of this exception.
causedByThrowable - the cause of this exception.

LockTimeoutException

public LockTimeoutException(String message,
                            Throwable causedByThrowable,
                            Object entity)
Builds an exception with a given message and given exception.

Parameters:
message - the message of this exception.
causedByThrowable - the cause of this exception.
Method Detail

getObject

public Object getObject()
Returns the object that caused this exception.

Returns:
the entity.


Copyright © 2007-2012 OW2 Consortium. All Rights Reserved.