About OptimisticLockException

manual

Locking in JPA

Explains how to use optimistic locking and pessimistic locking in JPA.... object being updated. The transaction fails and an OptimisticLockException javax.persistence.OptimisticLockException JPA exception Thrown by the persistence ...

 
api-jpa

JPA Exceptions

Reference (JavaDoc) of the JPA exception classes, including PersistenceException, EntityExistsException, EntityNotFoundException, LockTimeoutException, NonUniqueResultException, NoResultException, OptimisticLockException, PessimisticLockException, QueryTimeoutException, RollbackException, TransactionRequiredException.... javax.persistence.OptimisticLockException ... javax.persistence.OptimisticLockException javax.persistence.PessimisticLockException ...

 
forum_thread

Remove an entity which attributes were changed - OptimisticLockException

We use an OSGi environment and we have three OSGi plugins.   In plugin A an entity is loaded and the entity is passed to plugin B. Plugin B changes an attribute on the entity. Plugin C removes the entity from the database. After commit the transaction an exception is caused with optimistic lock exception of the removed entity. If this operations on the entity are executed in only one plugin, it works well. ... changes of user 1 are local in memory and will fail with OptimisticLockException if user 1 is committing or flushing the changes ... object, which is increased on every update. An  OptimisticLockException  is thrown when that version number indicates a ...

 
api-jpa

javax.persistence.OptimisticLockException

Thrown by the persistence provider when an optimistic locking conflict occurs.(Exception of JPA)

 
api-jpa

OptimisticLockException()

Constructs a new OptimisticLockException exception with null as its detail message.(Constructor of javax.persistence.OptimisticLockException)

 
api-jpa

OptimisticLockException(cause)

Constructs a new OptimisticLockException exception with the specified cause.(Constructor of javax.persistence.OptimisticLockException)

 
api-jpa

OptimisticLockException(entity)

Constructs a new OptimisticLockException exception with the specified entity.(Constructor of javax.persistence.OptimisticLockException)

 
api-jpa

OptimisticLockException(message)

Constructs a new OptimisticLockException exception with the specified detail message.(Constructor of javax.persistence.OptimisticLockException)

 
api-jpa

OptimisticLockException(message, cause)

Constructs a new OptimisticLockException exception with the specified detail message and cause.(Constructor of javax.persistence.OptimisticLockException)

 
api-jpa

OptimisticLockException(message, cause, entity)

Constructs a new OptimisticLockException exception with the specified detail message, cause, and entity.(Constructor of javax.persistence.OptimisticLockException)