Home » Search

About optimistic

1-10 of 82Refresh
Manual
105

Locking in JPA

JPA 2 supports both optimistic locking and pessimistic locking. Locking is essential to avoid ... separately. Optimistic locking is applied on transaction commit. Any database object ... by another transaction. When using ObjectDB, optimistic locking is enabled by default and fully
JDO Doc
72

setOptimistic(optimistic)

Method javax.jdo.Transaction void setOptimistic(   boolean optimistic ) Optimistic transactions do not hold data store locks until commit time. If an implementation does not support this option, a JDOUnsupportedOptionException is thrown. Parameters: optimistic - the value of the Optimistic flag. Since: JDO 1.0
JDO Doc
69

Constants.OPTION_OPTIMISTIC

Static Field javax.jdo.Constants String OPTION_OPTIMISTIC "javax.jdo.option.Optimistic" Since: JDO 2.1 See Also: PersistenceManagerFactory.supportedOptions()
JDO Doc
69

Constants.PMF_ATTRIBUTE_OPTIMISTIC

Static Field javax.jdo.Constants String PMF_ATTRIBUTE_OPTIMISTIC The name of the persistence manager factory element's "optimistic" attribute. Since: JDO 2.1
JDO Doc
69

Constants.PROPERTY_OPTIMISTIC

Static Field javax.jdo.Constants String PROPERTY_OPTIMISTIC "javax.jdo.option.Optimistic" Since: JDO 2.1 See Also: PersistenceManagerFactory.getOptimistic()
JPA Doc
69

LockModeType.OPTIMISTIC

Enum Constant javax.persistence.LockModeType OPTIMISTIC Optimistic lock. Since: JPA 2.0
JPA Doc
69

LockModeType.OPTIMISTIC_FORCE_INCREMENT

Enum Constant javax.persistence.LockModeType OPTIMISTIC_FORCE_INCREMENT Optimistic lock, with version update. Since: JPA 2.0
Manual
48

Advanced JPA Topics

Describes advanced JPA topics - detached entity objects, lock management and entity lifecycle events.
Forum
24

Optimistic Locking

We are having problems with optimistic locking. I made a simple test case to try to induce an optimistic lock. I have two users logged on to our system.  They both read and display the same data ... does not get an optimistic lock exception, so the database has user 2’s change. Do you have a simple
Forum
24

Optimistic lock failed

: Failed to commit transaction: Optimistic lock failed for object com.example.MyEntity#3 (object ... If you must avoid optimistic lock exceptions you can use pessimistic exceptions, but it is more efficient to remain with optimistic locking (which is the default) and just handle these exceptions