ObjectDB ObjectDB

Internal Website Search

31-40 of 46 resultsRefresh
19

"Attempt to lock a non entity object" error

(),       LockModeType.PESSIMISTIC_WRITE); . . } //doEdit ... .persistence.LockModeType; import javax.persistence.Persistence; //---------------- @Entity ... );         em.lock(p, LockModeType.PESSIMISTIC_WRITE);         System.out.println("After find and first lock
13

EntityTransaction.commit() does not release a pessimistic lock

(); Account a1 = em1.find(Account.class, 0, LockModeType.PESSIMISTIC_WRITE); a1.credit(10 ... .getTransaction().begin(); Account a2 = em2.find(Account.class, 0, LockModeType.PESSIMISTIC_READ
9

Optimistic locking failure

problem with LockModeType.READ: Thread[Thread-1,5,main] READ A1 version=1 value=0 Thread[Thread-1,5,main
5

lock(entity, lockMode)

Method javax.persistence.EntityManager void lock( Object entity, LockModeType lockMode ) Lock an entity instance that is contained in the persistence context with the specified lock mode type. If a pessimistic lock mode type is specified and the entity contains a version attribute, the persistence
5

setLockMode(lockMode)

Method javax.persistence.TypedQuery TypedQuery<X> setLockMode( LockModeType lockMode ) Set the lock mode type to be used for the query execution. Parameters: lockMode - lock mode Returns: the same query instance Throws: IllegalStateException - if the query is found not to be a Java Persistence
5

getLockMode(entity)

Method javax.persistence.EntityManager LockModeType getLockMode( Object entity ) Get the current lock mode for the entity instance. Parameters: entity - entity instance Returns: lock mode Throws: TransactionRequiredException - if there is no transaction IllegalArgumentException - if the instance
5

getLockMode()

Method javax.persistence.Query LockModeType getLockMode() Get the current lock mode for the query. Returns: lock mode Throws: IllegalStateException - if the query is found not to be a Java Persistence query language SELECT query or a Criteria API query Since: JPA 2.0
5

java.lang.Comparable

, JoinType, LoadState, LockModeType, LongIdentity, NullValue, ObjectIdentity, ObjectState
5

java.io.Serializable

, JDOUnsupportedOptionException, JDOUserCallbackException, JDOUserException, JoinType, LoadState, LockModeType
2

ObjectDB 2.4.0

classes (issue #672). Fixed LockModeType.OPTIMISTIC (READ) by handling it as OPTIMISTIC_FORCE_INCREMENT. Fixed a bug in optimistic locking on find by using LockModeType.WRITE. Fixed exception

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