ObjectDB ObjectDB

Internal Website Search

1-10 of 87 resultsRefresh
137

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 ... not get an optimistic lock exception, so the database has user 2’s change. Do you have a simple test
135

Optimistic lock failed

: Failed to commit transaction: Optimistic lock failed for object com.example.MyEntity#3 (object ... /jpa/persistence/lock 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
77

LockModeType.OPTIMISTIC

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

LockModeType.OPTIMISTIC_FORCE_INCREMENT

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

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
8

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
7

Constants.PROPERTY_OPTIMISTIC

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

Constants.OPTION_OPTIMISTIC

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

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
4

[ODB1] Chapter 5 - JDO Connections

.option.Optimistic", "false"); properties.setProperty( "javax.jdo.option.NontransactionalRead ... another type of transaction called optimistic transactions. When using optimistic transactions, objects ... succeeds while the second fails, throws an exception, and is rolled back automatically. Optimistic

Getting Started

ObjectDB is very easy to use. Follow the Getting Started Tutorial and the Quick Tour manual chapter and in minutes you may be able to write and run first Java programs against ObjectDB.

Prior knowledge or experience in database programming (SQL, JDBC, ORM, JPA, etc.) is not required, but some background in using the Java language is essential.

Need Help?

  1. Search ObjectDB website
  2. Read the FAQ
  3. Follow the Tutorials
  4. View or post in the forum
  5. Search or file an issue
  6. Contact support